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

Method onAdd

Engine/source/materials/shaderData.cpp:136–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136bool ShaderData::onAdd()
137{
138 if( !Parent::onAdd() )
139 return false;
140
141 mShaderMacros.clear();
142
143 // Keep track of it.
144 smAllShaderData.push_back( this );
145
146 // NOTE: We initialize the shader on request.
147
148 for(int i = 0; i < NumTextures; ++i)
149 {
150 if( mSamplerNames[i].isNotEmpty() && !mSamplerNames[i].startsWith("$") )
151 mSamplerNames[i].insert(0, "$");
152 }
153
154 return true;
155}
156
157void ShaderData::onRemove()
158{

Callers

nothing calls this directly

Calls 5

startsWithMethod · 0.80
clearMethod · 0.45
push_backMethod · 0.45
isNotEmptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected