[osg-users] VBO's - lifetime.

Robert Osfield robert.osfield at gmail.com
Wed Nov 25 01:47:38 PST 2009


HI Nico,

This is clearly a bug, as it certainly shouldn't crash with this type
of usage.  I will be investigating various bugs today and will have a
look at this one as well.

Which platform are you working on?
Robert.

On Tue, Nov 24, 2009 at 8:18 PM, Nico Kruithof <Nico at nghk.nl> wrote:
> Hello,
> When a node with VBO's enabled outlives the lifetime of it's renderer, I get
> an access violation in GLBufferObjectSet::orphan when I try to destroy the
> node. I tried to write down the scenario:
> using namespace osg;
> ref_ptr<Node> node(new Node);
> ref_ptr<Geometry> geom(new osg::Geometry);
> // ... fill geom
> geom->setUseVertexBufferObjects(true);
> node->addDrawable(geom.get());
> {
>   ref_ptr<osgViewer::Viewer> viewer(new osgViewer::Viewer());
>   viewer->setSceneData(node);
>   viewer->frame();
>   // render for a while
>   viewer = NULL; // The viewer is destroyed here
> }
> node = NULL; // This gives the access violation.
>
> Now if I don't set "geom->setUseVertexBufferObjects(true);" everything works
> fine. Do you still need a valid render context or a valid viewer to be able
> to clean up the VBO's?
> Nico
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


More information about the osg-users mailing list