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

Method addShaderMacro

Engine/source/materials/matInstance.cpp:421–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void MatInstance::addShaderMacro( const String &name, const String &value )
422{
423 // Check to see if we already have this macro.
424 Vector<GFXShaderMacro>::iterator iter = mUserMacros.begin();
425 for ( ; iter != mUserMacros.end(); iter++ )
426 {
427 if ( iter->name == name )
428 {
429 iter->value = value;
430 return;
431 }
432 }
433
434 // Add a new macro.
435 mUserMacros.increment();
436 mUserMacros.last().name = name;
437 mUserMacros.last().value = value;
438}
439
440//----------------------------------------------------------------------------
441// Setup pass - needs scenegraph data because the lightmap will change across

Callers 2

initMethod · 0.80
LightMaterialInfoMethod · 0.80

Calls 4

incrementMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected