OpenGL2: Clean up texmod calculations, and improve vertex animation handling.

This commit is contained in:
SmileTheory 2013-10-14 01:55:54 -07:00
parent f8355ba2fb
commit 08fcecc829
7 changed files with 92 additions and 604 deletions

View file

@ -608,6 +608,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);
@ -856,6 +857,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)
@ -923,6 +927,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);
}
}