diff options
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llrendertarget.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 14 |
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) |