Fixed position of glBindBuffer.
This commit is contained in:
parent
486f5c1a30
commit
4fb9039d0c
@ -110,6 +110,7 @@ void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
|
||||
}
|
||||
|
||||
glDrawElements(_mode, size(), GL_UNSIGNED_BYTE, 0);
|
||||
|
||||
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
}
|
||||
else
|
||||
@ -169,8 +170,9 @@ void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
|
||||
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, buffer);
|
||||
}
|
||||
|
||||
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, 0);
|
||||
|
||||
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -230,6 +232,7 @@ void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
|
||||
}
|
||||
|
||||
glDrawElements(_mode, size(), GL_UNSIGNED_INT, 0);
|
||||
|
||||
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user