| 419 | } |
| 420 | |
| 421 | void 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 |