From bf8b1bca7d7c2b84ca0460c4af9341a65dcfb025 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 22 Apr 2010 16:28:33 +0100 Subject: Let GL errors be caught on Linux - don't know why this was disabled. (transplanted from a149524a63039870704a498952d9bb3aa599b472) --- indra/llrender/llgl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 2ee7b16cf3..7ff68fe34b 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1041,7 +1041,7 @@ void flush_glerror() void do_assert_glerror() { - if (!gGLManager.mInited) + if (LL_UNLIKELY(!gGLManager.mInited)) { LL_ERRS("RenderInit") << "GL not initialized" << LL_ENDL; } @@ -1049,10 +1049,9 @@ void do_assert_glerror() GLenum error; error = glGetError(); BOOL quit = FALSE; - while (error) + while (LL_UNLIKELY(error)) { quit = TRUE; -#ifndef LL_LINUX // *FIX: ! This should be an error for linux as well. GLubyte const * gl_error_msg = gluErrorString(error); if (NULL != gl_error_msg) { @@ -1076,7 +1075,6 @@ void do_assert_glerror() } } error = glGetError(); -#endif } if (quit) -- cgit v1.2.3