Thanks for the replies.

You'll need to call array->dirty() on each of the osg::Array's in the
geometry for it to update.  In 2.0 this should now automatically allow
the VBO to update.  This is something I got working in a round of work
about 6 weeks before 2.0.

Yes, this got my rendering moving again. Thank you! Unfortunately, I'm
doing work remotely at the moment so benchmarking has to wait :(

So one concern before I move on. Somebody suggested to me that an
additional problem may be that the OSG source does not appear to the
GL_DYNAMIC_DRAW_ARB and GL_STREAM_DRAW_ARB which is what I'm probably
after. (I'm a newbie to VBOs, so I'm very trusting of this.) Grepping
through the source, these two constants appear in the OSG 2.0 source,
but they are commented out. I believe my usage case reflects the
STREAM classification. Should I be concerned that this is commented
out. Would activating these commented out types be difficult?


VBOs are not a magic performance booster. You can think of VBOs as
vertex arrays but stored on the graphic card (similar as with display
lists - VBO is a kind-of hybrid between the two). You will get a
performance benefit only if these data do not change too often. If you
are streaming  new data on every frame, the advantage over vertex arrays
will be either very small or you may even have a performance penalty.

Ideally, VBOs should be used to upload the geometry to the GPU (similar
to a display list) and then just use a vertex shader to deform/animate
it. This is how e.g. character skinning is commonly done. There you will
get a much better performance than by deforming the geometry on CPU and
then being fillrate bound while streaming the changes to the GPU.

So I am not doing geometry deformation. I am displaying a continuous
live stream of data as it comes in so I cannot programmatically
transform the data as far as I know so I don't think there is anything
useful I can do with shaders here. (If there is, I would be interested
in hearing more about it.) The information I'm getting on VBOs is that
is essentially like DMA to the video card and it was intended for the
very kind of thing I am trying to do (hence the DYNAMIC and STREAM
values).

Thanks,
Eric
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to