From cf52b2db50f79f7d00ecab39a4d94c1e8362ba2f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 8 Aug 2016 18:30:20 +0100 Subject: [PATCH] Removed unncessary checks --- src/osg/PrimitiveSet.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/osg/PrimitiveSet.cpp b/src/osg/PrimitiveSet.cpp index 4958fdfab..a654d5a92 100644 --- a/src/osg/PrimitiveSet.cpp +++ b/src/osg/PrimitiveSet.cpp @@ -196,9 +196,7 @@ void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const if (useVertexBufferObjects) { GLBufferObject* ebo = getOrCreateGLBufferObject(state.getContextID()); - - if (state.getCurrentVertexArrayState()) state.getCurrentVertexArrayState()->bindElementBufferObject(ebo); - else state.bindElementBufferObject(ebo); + state.getCurrentVertexArrayState()->bindElementBufferObject(ebo); if (ebo) { @@ -259,18 +257,7 @@ void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const if (useVertexBufferObjects) { GLBufferObject* ebo = getOrCreateGLBufferObject(state.getContextID()); - - - if (state.getCurrentVertexArrayState()) - { - VOA_NOTICE<<" DrawElementsUShort::draw() size="<