From a664676e5d7bcb9a29851ef94486d905c352b1a2 Mon Sep 17 00:00:00 2001 From: Jens Hemprich <31758696+jenshemprich@users.noreply.github.com> Date: Mon, 12 Jun 2006 14:05:39 +0000 Subject: [PATCH] Added checks for client textue state --- MacGLide/OpenGLide/Glide.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MacGLide/OpenGLide/Glide.cpp b/MacGLide/OpenGLide/Glide.cpp index 9ffa931..59482c5 100644 --- a/MacGLide/OpenGLide/Glide.cpp +++ b/MacGLide/OpenGLide/Glide.cpp @@ -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(); } }