diff --git a/include/osg/Drawable b/include/osg/Drawable index 083c47105..cff1710c0 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -566,7 +566,7 @@ inline void Drawable::draw(RenderInfo& renderInfo) const State::SetCurrentVertexArrayStateProxy setVASProxy(state, vas); - vas->bindVertexArrayObject(); + state.bindVertexArrayObject(vas); drawInner(renderInfo); @@ -576,7 +576,11 @@ inline void Drawable::draw(RenderInfo& renderInfo) const } // TODO, add check against whether VAO is active and supported - if (state.getCurrentVertexArrayState()) state.getCurrentVertexArrayState()->bindVertexArrayObject(); + if (state.getCurrentVertexArrayState()) + { + //OSG_NOTICE<<"state.getCurrentVertexArrayState()->getVertexArrayObject()="<< state.getCurrentVertexArrayState()->getVertexArrayObject()<