Hi Joan,

On Thu, Jun 23, 2011 at 9:33 AM, Joan Navarro <joannavar...@gmail.com> wrote:
> I have a scene with a lot of .ive objects. I'm trying to get better frame 
> rates. Now I want to apply the VBO technique to the ive model. For this goal, 
> I traverse the object until I visit the geometry node (geom).
>
> At this point I write the following orders:
>
> geom->setUseDisplayList (false);
> geom->setUseVertexBufferObjects(true);
>
> As result the frame rate decreases.
>
> Is this the correct way to use VBO's with the .ive?

VBO's and .ive file are completely orthogonal features, so to enable
VBO's you do as you've done, and this doesn't change whether the scene
graph was created manually or from plugin.

The only thing I would add is that when VBO's are enabled the display
lists are not used so the the UseDisplayList setting is irrellevant,
it's only if VBO's aren't supported will the Drawable fallback to
display lists.  So for you case doing a
setUseVertexBufferobjects(true) should be sufficient.

> Can I make something to improve my program with this technique?

Whether VBO's will help performance depends a great deal on your scene
graph - if there are tens of thousands of separate osg::Geometry on
screen at any time then the draw dispatch is likely to be a bottleneck
so using display lists that use less OpenGL class can be faster than
using VBO's as the VBO's require more OpenGL calls to set up each time
a Geometry is sent.  VBO's do tend to more efficient down on the GPU
though.

Also whether VBO's are faster or not depends upon your drivers and
also the way you've packed you primitive and vertex/colour/normal data
in your osg::Geometry - for instance if the osg::Geometry has to drop
down to OpenGL slow paths to render your Geometry then will be a large
CPU overhead associated with dispatching the data.

This topic has been covered many times on osg-users so please have a
look through the archives.

Oh.. And make sure you only do performance tests with a release build
because debug builds totally throw off any analysis.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to