summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-04-20 11:38:07 -0500
committerDave Parks <davep@lindenlab.com>2010-04-20 11:38:07 -0500
commita49b1f5e00ae1a03469de5fae4b36233a0442b54 (patch)
tree42226beb77af3f5ddfa4f4b22b2793d0a6dee121
parente275b7a658ee29ca4ce3dd77908ddd4c34749449 (diff)
Make assert_glerror not a hotspot.
-rw-r--r--indra/llrender/llgl.cpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 97019d48c4..2ee7b16cf3 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1039,23 +1039,8 @@ void flush_glerror()
glGetError();
}
-void assert_glerror()
+void do_assert_glerror()
{
- if (!gGLActive)
- {
- //llwarns << "GL used while not active!" << llendl;
-
- if (gDebugSession)
- {
- //ll_fail("GL used while not active");
- }
- }
-
- if (gNoRender || !gDebugGL)
- {
- return;
- }
-
if (!gGLManager.mInited)
{
LL_ERRS("RenderInit") << "GL not initialized" << LL_ENDL;
@@ -1107,6 +1092,25 @@ void assert_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)
+ {
+ do_assert_glerror();
+ }
+}
+
+
void clear_glerror()
{
// Create or update texture to be used with this data