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
1 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,15 @@ void GL_SelectTexture (GLenum 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 )
{
GL_SelectTexture( target );
@ -45,6 +54,7 @@ void GL_Bind (int texnum)
{
if (gl_state.currenttextures[gl_state.currenttmu] == texnum)
return;
gl_state.currenttextures[gl_state.currenttmu] = texnum;
bindTexFunc (GL_TEXTURE_2D, texnum);