Added checks for client textue state

This commit is contained in:
Jens Hemprich 2006-06-12 14:05:39 +00:00
parent 46f7f9fe2f
commit a664676e5d
1 changed files with 14 additions and 0 deletions

View File

@ -360,6 +360,13 @@ bool VerifyActiveTextureUnit_impl(GLint x, const char* functionname)
{
GlideMsg("Warning: %s() active texture unit is GL_TEXTURE%d_ARB, but should be GL_TEXTURE%d_ARB\n", functionname, y - GL_TEXTURE0_ARB, x - GL_TEXTURE0_ARB);
}
glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE_ARB, &y);
glReportError();
bVerified = x == y;
if (!bVerified)
{
GlideMsg("Warning: %s() client active texture unit is GL_TEXTURE%d_ARB, but should be GL_TEXTURE%d_ARB\n", functionname, y - GL_TEXTURE0_ARB, x - GL_TEXTURE0_ARB);
}
return bVerified;
}
#endif
@ -386,6 +393,13 @@ bool VerifyTextureEnabledState_impl(const char* functionname)
GlideMsg("Warning: texture unit GL_TEXTURE%d_ARB is %s in %s()\n", OpenGL.ColorAlphaUnit1 + unit_index - GL_TEXTURE0_ARB, bState ? "enabled" : "disabled", functionname);
bVerified = false;
}
bState = glIsEnabled(GL_TEXTURE_COORD_ARRAY);
if (bState != (OpenGL.ColorAlphaUnitColorEnabledState[unit_index] ||
OpenGL.ColorAlphaUnitAlphaEnabledState[unit_index]))
{
GlideMsg("Warning: texcoord array for unit GL_TEXTURE%d_ARB is %s in %s()\n", OpenGL.ColorAlphaUnit1 + unit_index - GL_TEXTURE0_ARB, bState ? "enabled" : "disabled", functionname);
bVerified = false;
}
glReportError();
}
}