MCPcopy Create free account
hub / github.com/aardappel/treesheets / GetTexture

Function GetTexture

lobster/src/graphics.cpp:46–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 return *GetResourceDec<Mesh *>(vm, res, &mesh_type);
45}
46Texture GetTexture(VM &vm, const Value &res) {
47 auto tex = GetResourceDec<Texture *>(vm, res, &texture_type);
48 return tex ? *tex : Texture();
49}
50
51// Should be safe to call even if it wasn't initialized partially or at all.
52// FIXME: move this elsewhere.

Callers 2

AddPhysicsFunction · 0.85
AddGraphicsFunction · 0.85

Calls 1

TextureClass · 0.85

Tested by

no test coverage detected