CreateNewTextureID: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (moved code) |
||
Line 7: | Line 7: | ||
{ | { | ||
currentId = surface()->'''CreateNewTextureID'''(); | currentId = surface()->'''CreateNewTextureID'''(); | ||
surface()->[[DrawSetTextureFile]]( currentId, texturename, false, true ); | |||
} | } | ||
[[Category:ISurface]] | [[Category:ISurface]] |
Revision as of 21:27, 12 May 2006
int 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 ); }