Improved the checks against VBO+VAO usage and cleaned up setup.

This commit is contained in:
Robert Osfield
2017-03-08 18:12:37 +00:00
parent 9b32395772
commit 854dac5340
2 changed files with 3 additions and 6 deletions

View File

@@ -858,7 +858,8 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const
drawPrimitivesImplementation(renderInfo);
if (!state.useVertexArrayObject(_useVertexArrayObject) || state.getCurrentVertexArrayState()->getRequiresSetArrays())
if (renderInfo.getState()->useVertexBufferObject(_supportsVertexBufferObjects && _useVertexBufferObjects) &&
(!state.useVertexArrayObject(_useVertexArrayObject) || state.getCurrentVertexArrayState()->getRequiresSetArrays()))
{
// unbind the VBO's if any are used.
state.unbindVertexBufferObject();