Fixed position of glBindBuffer.

This commit is contained in:
Robert Osfield 2005-06-14 08:48:48 +00:00
parent 486f5c1a30
commit 4fb9039d0c

View File

@ -110,6 +110,7 @@ void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
} }
glDrawElements(_mode, size(), GL_UNSIGNED_BYTE, 0); glDrawElements(_mode, size(), GL_UNSIGNED_BYTE, 0);
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0); extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
} }
else 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, buffer);
} }
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, 0); glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, 0);
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
} }
else else
{ {
@ -230,6 +232,7 @@ void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
} }
glDrawElements(_mode, size(), GL_UNSIGNED_INT, 0); glDrawElements(_mode, size(), GL_UNSIGNED_INT, 0);
extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0); extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
} }
else else