[osg-users] Dynamic Geometry per frame
Robert Osfield
robert.osfield at gmail.com
Thu Apr 9 03:44:45 PDT 2015
Hi Adam and Sebastian,
On 9 April 2015 at 09:49, Sebastian Messerschmidt <
sebastian.messerschmidt at gmx.de> wrote:
> HI Adam
>
> Simply configurethe geometry to
> geom->setUseDisplayList(false);
> geom->setUseVertexBufferObjects(true);
> in order to deactivate the display list generation
>
> Also, I think you don't have to use setVertexArray, as long as you keep
> the array as a pointer. (@Robert, is the data actually copied?)
>
The easiest way for dynamic geometry is to disable display lists and vertex
buffer objects, this way the vertex data is copied to the driver on every
frame without any further changes.
Using display lists is very expensive for dynamic geometry definitely one
to avoid. If you you do want to use VBO's then you'll need to dirty the
vertex array on each new frame, so that the OSG knows that that array needs
passing on to OpenGL.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150409/ef0f1499/attachment-0003.htm>
More information about the osg-users
mailing list