Hi,

I’m trying to convert some code (which I’m not the original author of) to use 
VBOs, and encountering some confusion. All of the following is with the respect 
to the OSG 3.2.0 release.

Firstly, am I correct that osg::Geometry::compileGLObjects is required for VBOs 
to function? Or is this purely an optional step?

The motivation for this, is I can see two control-paths which call 
compileGLObjects; the GLObjectsVisitor triggered when the scene is set via 
View::setSceneData -> Renderer::setCompileOnNextDraw, and the ‘DoPreCompile’ 
path on the DatabasePager. The Geometry I’m adding above doesn’t enter the 
scene via either of these mechanisms, so as far as I can see from debugging, it 
is never compiled (perhaps this is a bug, and there is something I should be 
doing to force compilation, but I can’t see a safe way to get the Renderer and 
hence invoke setCompileOnNextDraw myself)

Regardless of the answer to the above, are there any additional steps I need 
besides setUseVertexBufferObjects(true) on the osg::Geometry? And is there a 
good way at runtime to verify VBOs are being used successfully, for a 
particular Geometry?

[Note I have verified State::isVertexBufferObjectSupported is returning true, 
so I believe I’m satisfying all the criteria I can see in the code]

Kind regards,
James


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to