summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-02 02:12:21 -0500
committerDave Parks <davep@lindenlab.com>2011-10-02 02:12:21 -0500
commitac37656aa5ff545c90fadfd5b585cb823ad68b0d (patch)
tree71af4561c22d90bf40ba54ba97b1350467f73e75 /indra/llrender
parent784fed2ebb3efd8e4da132c291aaf16cdb931b98 (diff)
SH-2276 Fix for failed assertions reported from debug-enabled viewers. Also, remove "Basic Shaders" as a user settable option (shaders are always on if GL version >= 2.0, always off otherwise)
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp2
-rw-r--r--indra/llrender/llrendertarget.cpp2
-rw-r--r--indra/llrender/llvertexbuffer.cpp14
3 files changed, 13 insertions, 5 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 189a460001..245e8c7bef 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -686,7 +686,7 @@ bool LLGLManager::initGL()
#if LL_WINDOWS
if (mHasDebugOutput && gDebugGL)
{ //setup debug output callback
- glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE);
+ //glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE);
glDebugMessageCallbackARB((GLDEBUGPROCARB) gl_debug_callback, NULL);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
}
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 1a80688dfc..cd3a7f21e4 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -308,8 +308,8 @@ void LLRenderTarget::release()
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
if (mStencil)
{ //attached as a renderbuffer
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
mStencil = false;
}
else
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 71596d41d3..7f2337a224 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -574,6 +574,8 @@ void LLVertexBuffer::unbind()
glBindVertexArray(0);
#endif
sGLRenderArray = 0;
+ sGLRenderIndices = 0;
+ sIBOActive = FALSE;
}
if (sVBOActive)
@@ -1131,9 +1133,7 @@ void LLVertexBuffer::setupVertexArray()
}
}
-#if GL_ARB_vertex_array_object
- glBindVertexArray(0);
-#endif
+ unbind();
}
void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
@@ -1873,6 +1873,12 @@ bool LLVertexBuffer::bindGLArray()
glBindVertexArray(mGLArray);
#endif
sGLRenderArray = mGLArray;
+
+ if (mGLIndices)
+ {
+ sGLRenderIndices = mGLIndices;
+ sIBOActive = TRUE;
+ }
return true;
}
@@ -2082,6 +2088,8 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
glBindVertexArray(0);
#endif
sGLRenderArray = 0;
+ sGLRenderIndices = 0;
+ sIBOActive = FALSE;
}
if (mGLBuffer)