-------------------------------------------------------------------------------- Description: Manually adding a texture 2d resource to this effect's list with creating it. This can fail if the texture name already exists --------------------------------------------------------------------------------
| 422 | // it. This can fail if the texture name already exists |
| 423 | // -------------------------------------------------------------------------------- |
| 424 | bool Tr2Effect::AddResourceTexture2D( const BlueSharedString& name, const char* resPath ) |
| 425 | { |
| 426 | // check if have that name already! |
| 427 | if( GetResourceByName( name.c_str() ) ) |
| 428 | { |
| 429 | return false; |
| 430 | } |
| 431 | // alloc and init the texture parameter |
| 432 | TriTextureParameterPtr texture2d; |
| 433 | texture2d.CreateInstance(); |
| 434 | texture2d->SetParameterName( name ); |
| 435 | texture2d->SetResourcePath( resPath ); |
| 436 | // add it to this effect's resources |
| 437 | m_resources.Append( texture2d->GetRawRoot() ); |
| 438 | return true; |
| 439 | } |
| 440 | |
| 441 | // -------------------------------------------------------------------------------- |
| 442 | bool Tr2Effect::AddResource( ITriEffectParameter* param ) |
no test coverage detected