Fixed inline Drawable::draw(..) method

This commit is contained in:
Robert Osfield
2018-04-16 15:08:24 +01:00
parent 9d72bf4712
commit 38ad6ed3b3

View File

@@ -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()<<std::endl;
state.bindVertexArrayObject(state.getCurrentVertexArrayState());
}
#ifdef OSG_GL_DISPLAYLISTS_AVAILABLE