Added lazy state updating for vertex array object binding/unbinding
This commit is contained in:
@@ -861,10 +861,12 @@ void SharedGeometry::compileGLObjects(osg::RenderInfo& renderInfo) const
|
||||
|
||||
osg::State::SetCurrentVertexArrayStateProxy setVASProxy(state, vas);
|
||||
|
||||
vas->bindVertexArrayObject();
|
||||
state.bindVertexArrayObject(vas);
|
||||
|
||||
if (vbo_glBufferObject) vas->bindVertexBufferObject(vbo_glBufferObject);
|
||||
if (ebo_glBufferObject) vas->bindElementBufferObject(ebo_glBufferObject);
|
||||
|
||||
state.unbindVertexArrayObject();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user