- fixed: For updating the model VAO's attribute pointers it is necessary to first bind the vertex buffer we need to refer to, because this is not part of the VAO's state.

This commit is contained in:
Christoph Oelckers 2014-07-27 11:53:18 +02:00
commit 77d9d9b2a5
2 changed files with 1 additions and 1 deletions

View file

@ -140,6 +140,7 @@ FModelVertexBuffer::~FModelVertexBuffer()
unsigned int FModelVertexBuffer::SetupFrame(unsigned int frame1, unsigned int frame2, float factor)
{
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
glVertexAttribPointer(VATTR_VERTEX, 3, GL_FLOAT, false, sizeof(FModelVertex), &VMO[frame1].x);
glVertexAttribPointer(VATTR_TEXCOORD, 2, GL_FLOAT, false, sizeof(FModelVertex), &VMO[frame1].u);
glVertexAttribPointer(VATTR_VERTEX2, 3, GL_FLOAT, false, sizeof(FModelVertex), &VMO[frame2].x);