Improved the checks against VBO+VAO usage and cleaned up setup.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user