[osg-users] Using Vertex Buffer Objects in osg::Geometry

Mustafa Kabak mustafakabak at gmail.com
Tue Oct 23 05:07:04 PDT 2007


Hi,

I am using osg 2.0 on Windows XP.

I am trying to get my own subclass of TerrainTechnique (which is
heavily inspired by GeometryTechnique) to work. Similar to
GeometryTechnique, I set and populate the vertex arrays and primitive
sets of an osg::Geometry object.

Differently from GeometryTechnique, in the cull() method I
incrementally update the vertex arrays; remove all primitive sets from
Geometry and set and populate new ones. (i.e. a dynamic terrain)

Here is my question: Do I need to do any specific things to use vbo's?
I only call setUseVertexBufferObjects(true) on Geometry and get
incorrect results, as if the primitives are not updated. No problems
when not using vbo's.

Before getting into debugging, I wanted to know if I am missing
anything simple (maybe setting a flag, or flushing a buffer?).

Regards,

-- 
Mustafa Kabak



More information about the osg-users mailing list