-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

E. Wing wrote:
> I am trying to enable Vertex Buffer Objects in my program (hoping to
> see some major performance gains), but it is not working correctly for
> me. I have a continuous stream of data I want to draw, but when I call
> setUseVertexBufferObjects(true);

> my rendered scene stops changing. It's almost like display lists were
> enabled and I forgot to call dirtyDisplayLists, but I know that I
> disabled displaylists (the code works with VBOs off).
> 

Well, but that is what is supposed to happen :) I think that your
problem with the geometry not changing is that you need to explicitly
dirty the node by calling dirtyBound(), otherwise the data will not be
updated. It is an optimization, I believe.

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.

Regards,

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFGhM1yn11XseNj94gRAuX8AKCqG1x8v2HO7AxwrIqpYp+Rx5bjhgCg8cFE
HLXxf7qirei+N689Z7xY+zg=
=1HQO
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to