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

Method setMaterial

Engine/source/gui/controls/guiMaterialCtrl.cpp:88–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88bool GuiMaterialCtrl::setMaterial( const String &materialName )
89{
90 SAFE_DELETE( mMaterialInst );
91
92 _setMaterial(StringTable->insert(materialName.c_str()));
93
94 if ( getMaterial() != StringTable->EmptyString() && isAwake() )
95 mMaterialInst = MATMGR->createMatInstance( getMaterial(), getGFXVertexFormat<GFXVertexPCT>() );
96
97 return true;
98}
99
100void GuiMaterialCtrl::inspectPostApply()
101{

Callers 2

_setMaterialMethod · 0.45

Calls 5

EmptyStringMethod · 0.80
isAwakeFunction · 0.50
insertMethod · 0.45
c_strMethod · 0.45
createMatInstanceMethod · 0.45

Tested by

no test coverage detected