summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 4584ed1d86..0e59c449db 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2370,6 +2370,12 @@ void clear_glerror()
glGetError();
}
+void drain_glerror()
+{
+ // bounded: a lost/reset context can return errors indefinitely
+ for (S32 i = 0; i < 16 && glGetError() != GL_NO_ERROR; ++i) {}
+}
+
///////////////////////////////////////////////////////////////
//
// LLGLState