CreateNewTextureID

From Valve Developer Community
Revision as of 18:16, 9 May 2006 by Ts2do (talk | contribs) (navbar, categorize, and sample)
Jump to navigation Jump to search

int CreateNewTextureID( bool procedural = false )

Use this before a DrawSetTexture function 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 );