CreateNewTextureID
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 ); }