1
0
Fork 0
forked from fte/fteqw

added code to make sure we've got the right texture unit selected.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@627 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-11 03:44:40 +00:00
parent 2af9590002
commit f43b24da6b

View file

@ -30,6 +30,15 @@ void GL_SelectTexture (GLenum target)
qglSelectTextureSGIS(target); qglSelectTextureSGIS(target);
} }
void GL_CheckTMUIs0(void)
{
if (gl_state.currenttmu != 0)
{
Con_Printf("TMU is not 0\n");
GL_SelectTexture(mtexid0);
}
}
void GL_MBind( GLenum target, int texnum ) void GL_MBind( GLenum target, int texnum )
{ {
GL_SelectTexture( target ); GL_SelectTexture( target );
@ -45,6 +54,7 @@ void GL_Bind (int texnum)
{ {
if (gl_state.currenttextures[gl_state.currenttmu] == texnum) if (gl_state.currenttextures[gl_state.currenttmu] == texnum)
return; return;
gl_state.currenttextures[gl_state.currenttmu] = texnum; gl_state.currenttextures[gl_state.currenttmu] = texnum;
bindTexFunc (GL_TEXTURE_2D, texnum); bindTexFunc (GL_TEXTURE_2D, texnum);