Hi Fred -- If you want some basic shape support combined with use of buffer objects, you should consider osgworks.googlecode.com, which contains convenience functions to create some basic shapes using osg::Geometry objects (which supports use of buffer objects). If you need shape metadata (sphere radius, box extents, etc) you can store that information as UserData on the Geometry objects.
   -Paul

Fred Smith wrote:
Hi,

setUseVertexBufferObjects(true) has no effect for me with the code below:


Code:
osg::Geode* geode = new osg::Geode();
geode->addDrawable(new osg::ShapeDrawable(new 
osg::Cylinder(osg::Vec3(4.4f,0.0f,0.0f),1.0f,1.4f)));
geode->getDrawable(0)->setUseVertexBufferObjects(true);




When I run this code with an OpenGL API tracer, I can see display lists are 
still being used (glNewList to build the display list, then glCallList to use 
it).

This test is easy to reproduce with the osgShaders sample, in GL2Scene.cpp, 
CreateModel() can be changed to reflect the above code.

I guess I must be doing something wrong to make use of VBOs.

Any idea?

Cheers,
Fred

[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30275#30275





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




--
  -Paul Martz      Skew Matrix Software
                   http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to