summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_vbo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/tr_vbo.c')
-rw-r--r--src/renderergl2/tr_vbo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/renderergl2/tr_vbo.c b/src/renderergl2/tr_vbo.c
index 09f6104a..7433b5b1 100644
--- a/src/renderergl2/tr_vbo.c
+++ b/src/renderergl2/tr_vbo.c
@@ -605,6 +605,7 @@ void R_BindVBO(VBO_t * vbo)
glState.vertexAttribsInterpolation = 0;
glState.vertexAttribsOldFrame = 0;
glState.vertexAttribsNewFrame = 0;
+ glState.vertexAnimation = qfalse;
qglBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo->vertexesVBO);
@@ -853,6 +854,9 @@ void RB_UpdateVBOs(unsigned int attribBits)
{
R_BindVBO(tess.vbo);
+ // orphan old buffer so we don't stall on it
+ qglBufferDataARB(GL_ARRAY_BUFFER_ARB, tess.vbo->vertexesSize, NULL, GL_DYNAMIC_DRAW_ARB);
+
if(attribBits & ATTR_BITS)
{
if(attribBits & ATTR_POSITION)
@@ -920,6 +924,9 @@ void RB_UpdateVBOs(unsigned int attribBits)
{
R_BindIBO(tess.ibo);
+ // orphan old buffer so we don't stall on it
+ qglBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, tess.ibo->indexesSize, NULL, GL_DYNAMIC_DRAW_ARB);
+
qglBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, tess.numIndexes * sizeof(tess.indexes[0]), tess.indexes);
}
}