MCPcopy Create free account
hub / github.com/defold/defold / AddTexture

Function AddTexture

engine/gui/src/gui.cpp:746–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744 }
745
746 static Result AddTexture(HScene scene, dmHashTable64<TextureInfo>& info_array, dmhash_t texture_name_hash, HTextureSource texture_source, NodeTextureType texture_type, uint32_t original_width, uint32_t original_height, uint32_t image_type)
747 {
748 if (info_array.Full())
749 return RESULT_OUT_OF_RESOURCES;
750
751 info_array.Put(texture_name_hash, TextureInfo(texture_source, texture_type, original_width, original_height, image_type));
752 UpdateTexture(scene, texture_name_hash, texture_source, texture_type);
753
754 return RESULT_OK;
755 }
756
757 Result AddTexture(HScene scene, dmhash_t texture_name_hash, HTextureSource texture_source, NodeTextureType texture_type, uint32_t original_width, uint32_t original_height)
758 {

Callers 5

AddDynamicTextureFunction · 0.70
NewDynamicTextureFunction · 0.70
TEST_FFunction · 0.50
TEST_FFunction · 0.50
SetupGuiSceneFunction · 0.50

Calls 4

TextureInfoClass · 0.85
UpdateTextureFunction · 0.85
FullMethod · 0.45
PutMethod · 0.45

Tested by 2

TEST_FFunction · 0.40
TEST_FFunction · 0.40