summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
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/llvertexbuffer.cpp
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/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp14
1 files changed, 11 insertions, 3 deletions
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)