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="<