Peter
there is an example of how to setup your custom geometry (even for morphing) 
using VBOs
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials
Look at the External examples, for osgGPUMorph.3.zip

Dimi



----- Original Message ----
From: Peter Wrobrl <[email protected]>
To: [email protected]
Sent: Tue, June 15, 2010 9:39:13 PM
Subject: [osg-users] Usage of Vertex Buffer Objects

Hi, I have several questions regarding osg and the usage of VBOs.

1.) How do I ensure usage of vertex buffer object ? When I set osg::Geometry 
setUseVertexBufferObject to true does this allways create a VBO from the 
structure I passed to osg::Geometry ? E.G. In the OSG Quick Start Guide by Paul 
Martz we create a Quad, with four Verts, four Colors and one Normal. Setting 
osg::Geometry setUseVertexBufferObject to true, would this create convert the 
data to four Verts/Colors/Normals ?

2.) A Textured Cube has 8 Vertices and at least 12 UVs. How to create this 
geometry as VBO ? The right Way would be to duplicate Vertices, to have as many 
as UVs, but how do I create this structure and put this into a geometry ? Same 
approach as above from the Quick Start guide ?

3.) Lets say I have a geometry like a human, with multiple UV Shells ( UV 
islands, the usual approach to texture a human ), e.g. Head, Chest, Arms, Legs. 
How and where do I specifiy these arrays and do I need a geometry per array ? I 
guess I cannot set multiple Vertex/Normal/UV Arrays into one geometry, so 
should I stich all those arrays and pass it as one ? But this would mean that I 
cannot use Triangle Strips, wouldn't it ?

4.) What is the Usage of osg::VertexBufferObject ? Its not a Drawable, and 
osg::Geometry has no setVertexBufferObject method. It can be set into a 
osg::Array, where the size of each element is constraint to enums. If I 
understood VBOs right I can define any Data of any size as one Array element, 
e.g. Vertex, Normal, and UV which would be 8 floats. There is no option for 8 
floats, so isn't this a limitation ?

Thanks for any help and advice

Cheers, ParticlePeter

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28969#28969





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



      
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to