From 536e38ad51b89808f26d8e3cd107fe093862d22a Mon Sep 17 00:00:00 2001 From: David Parks Date: Tue, 22 Sep 2009 11:11:45 +0000 Subject: Merging render-pipeline-6-qa-2 into viewer-2 Self reviewed. --- indra/llrender/llgl.cpp | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 7e1df0e565..e29688bf24 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::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(); -- cgit v1.2.3 From 658849ee953da606035efba20a6e599ea7e9eb0f Mon Sep 17 00:00:00 2001 From: David Parks Date: Wed, 23 Sep 2009 08:02:49 +0000 Subject: Getting rid of "gl used while not active" test until such time as it is needed/useful (when threading is revisited). --- indra/llrender/llgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llgl.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index e29688bf24..10315bacf1 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1022,7 +1022,7 @@ void assert_glerror() if (gDebugSession) { - ll_fail("GL used while not active"); + //ll_fail("GL used while not active"); } } -- cgit v1.2.3