CreateNewTextureID: Difference between revisions
Jump to navigation
Jump to search
m (moved code) |
m (added class) |
||
Line 1: | Line 1: | ||
{{navbar|DrawGetTextureId|ISurface|DrawSetTextureFile}} | {{navbar|DrawGetTextureId|ISurface|DrawSetTextureFile}} | ||
=int '''CreateNewTextureID'''( bool procedural = false )= | =int [[ISurface]]::'''CreateNewTextureID'''( bool procedural = false )= | ||
Use this before [[DrawSetTextureFile]] or [[DrawSetTextureRGBA]] and after [[DrawGetTextureId]] to initialize a new texture ID. | Use this before [[DrawSetTextureFile]] or [[DrawSetTextureRGBA]] and after [[DrawGetTextureId]] to initialize a new texture ID. | ||
==Sample== | ==Sample== |
Latest revision as of 19:32, 28 June 2006
int ISurface::CreateNewTextureID( bool procedural = false )
Use this before DrawSetTextureFile or DrawSetTextureRGBA and after DrawGetTextureId to initialize a new texture ID.
Sample
currentId = surface()->DrawGetTextureId( texturename ); if ( currentId == -1 ) { currentId = surface()->CreateNewTextureID(); surface()->DrawSetTextureFile( currentId, texturename, false, true ); }