MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / set

Method set

Engine/source/gfx/gfxTextureHandle.cpp:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60bool GFXTexHandle::set( const String &texName, GFXTextureProfile *profile, const String &desc )
61{
62 // Clear the existing texture first, so that
63 // its memory is free for the new allocation.
64 free();
65
66 // Create and set the new texture.
67 AssertFatal( texName.isNotEmpty(), "Texture name is empty" );
68 StrongObjectRef::set( TEXMGR->createTexture( texName, profile ) );
69
70 #ifdef TORQUE_DEBUG
71 if ( getPointer() )
72 getPointer()->mDebugDescription = desc;
73 #endif
74
75 return isValid();
76}
77
78bool GFXTexHandle::set(const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc)
79{

Callers

nothing calls this directly

Calls 6

freeFunction · 0.85
setFunction · 0.50
StringClass · 0.50
isNotEmptyMethod · 0.45
createTextureMethod · 0.45

Tested by

no test coverage detected