summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-10-16 11:52:43 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-10-16 11:52:43 -0400
commit1f8b37e9ad65f8064b83adac295d9eb162976e4c (patch)
tree3ced849ad5750b7884d291e17e89fec419e03382 /indra/llrender/llgl.cpp
parent2331b9a93b12eb0a2f5fb6109f990d81b29d0584 (diff)
parentf7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff)
merge
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rwxr-xr-xindra/llrender/llgl.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 5bee3735eb..66fbecef39 100755
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -59,6 +59,7 @@ BOOL gDebugGL = FALSE;
BOOL gClothRipple = FALSE;
BOOL gHeadlessClient = FALSE;
BOOL gGLActive = FALSE;
+BOOL gGLDebugLoggingEnabled = TRUE;
static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
static const std::string HEADLESS_RENDERER_STRING("Headless");
@@ -80,6 +81,8 @@ void APIENTRY gl_debug_callback(GLenum source,
const GLchar* message,
GLvoid* userParam)
{
+ if (gGLDebugLoggingEnabled)
+ {
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
llwarns << "----- GL ERROR --------" << llendl;
@@ -98,6 +101,7 @@ void APIENTRY gl_debug_callback(GLenum source,
llerrs << "Halting on GL Error" << llendl;
}
}
+}
#endif
void parse_glsl_version(S32& major, S32& minor);
@@ -258,6 +262,7 @@ PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback = NULL;
PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback = NULL;
PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings = NULL;
PFNGLBINDBUFFERRANGEPROC glBindBufferRange = NULL;
+PFNGLBINDBUFFERBASEPROC glBindBufferBase = NULL;
//GL_ARB_debug_output
PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB = NULL;
@@ -648,7 +653,8 @@ bool LLGLManager::initGL()
}
#if LL_DARWIN
else if ((mGLRenderer.find("9400M") != std::string::npos)
- || (mGLRenderer.find("9600M") != std::string::npos))
+ || (mGLRenderer.find("9600M") != std::string::npos)
+ || (mGLRenderer.find("9800M") != std::string::npos))
{
mIsMobileGF = TRUE;
}
@@ -1247,6 +1253,7 @@ void LLGLManager::initExtensions()
glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) GLH_EXT_GET_PROC_ADDRESS("glEndTransformFeedback");
glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) GLH_EXT_GET_PROC_ADDRESS("glTransformFeedbackVaryings");
glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glBindBufferRange");
+ glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) GLH_EXT_GET_PROC_ADDRESS("glBindBufferBase");
}
if (mHasDebugOutput)
{
@@ -1501,7 +1508,7 @@ void do_assert_glerror()
void assert_glerror()
{
- if (!gGLActive)
+/* if (!gGLActive)
{
//llwarns << "GL used while not active!" << llendl;
@@ -1510,8 +1517,13 @@ void assert_glerror()
//ll_fail("GL used while not active");
}
}
+*/
- if (gDebugGL)
+ if (!gDebugGL)
+ {
+ //funny looking if for branch prediction -- gDebugGL is almost always false and assert_glerror is called often
+ }
+ else
{
do_assert_glerror();
}