From 38ad6ed3b37615d6c126055054be4c12465392e7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 16 Apr 2018 15:08:24 +0100 Subject: [PATCH] Fixed inline Drawable::draw(..) method --- include/osg/Drawable | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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()<