diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-09-26 18:08:24 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-09-26 18:08:24 -0400 |
commit | bc4444cd78067cbf11d3ffb210375a31a33f96bd (patch) | |
tree | d9b8e78db237869e630fec6c71335d1294cec101 /indra/llrender/llgl.cpp | |
parent | 8ddc0c0ac43e9d10bf0262cd1ab3c0e79808fc14 (diff) | |
parent | 09bf3c1fec107e9e66514837d208ef62a6b67b91 (diff) |
Merge into viewer/viewer-20 yesterday's lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r-- | indra/llrender/llgl.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 7e1df0e565..10315bacf1 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -64,6 +64,8 @@ BOOL gDebugSession = FALSE; BOOL gDebugGL = FALSE; BOOL gClothRipple = FALSE; BOOL gNoRender = FALSE; +BOOL gGLActive = FALSE; + std::ofstream gFailLog; @@ -107,6 +109,7 @@ LLMatrix4 gGLObliqueProjectionInverse; #define LL_GL_NAME_POOLING 0 LLGLNamePool::pool_list_t LLGLNamePool::sInstances; +std::list<LLGLUpdate*> LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS // ATI prototypes @@ -1013,6 +1016,16 @@ void flush_glerror() void assert_glerror() { + if (!gGLActive) + { + //llwarns << "GL used while not active!" << llendl; + + if (gDebugSession) + { + //ll_fail("GL used while not active"); + } + } + if (gNoRender || !gDebugGL) { return; @@ -1258,8 +1271,10 @@ void LLGLState::checkTextureChannels(const std::string& msg) }; GLint stackDepth = 0; - LLMatrix4 identity; - LLMatrix4 matrix; + + glh::matrix4f mat; + glh::matrix4f identity; + identity.identity(); for (GLint i = 1; i < maxTextureUnits; i++) { @@ -1280,10 +1295,10 @@ void LLGLState::checkTextureChannels(const std::string& msg) } } - glGetFloatv(GL_TEXTURE_MATRIX, (GLfloat*) matrix.mMatrix); + glGetFloatv(GL_TEXTURE_MATRIX, (GLfloat*) mat.m); stop_glerror(); - if (matrix != identity) + if (mat != identity) { error = TRUE; LL_WARNS("RenderState") << "Texture matrix in channel " << i << " corrupt." << LL_ENDL; @@ -1309,10 +1324,6 @@ void LLGLState::checkTextureChannels(const std::string& msg) stop_glerror(); } - glh::matrix4f mat; - glh::matrix4f identity; - identity.identity(); - glGetFloatv(GL_TEXTURE_MATRIX, mat.m); stop_glerror(); |