[osg-users] [About VertexArrayObject Branch] FeedBack and Insight

Julien Valentin julienvalentin51 at gmail.com
Tue Aug 16 10:37:24 PDT 2016


Hello all 
@scraw : geometries doesn't have to share vertex arrays but bufferobjects..this is not the same:
The pattern that maximize vao reutilization is the followed
Geom1 
G1VertAttrib1->BO1 G1VertAttrib2->BO2...and a Unique IndexArray->BON
Geom2 
G2VertAttrib1->BO1 G2VertAttrib2->BO2...and a Unique IndexArray->BON

With this pattern and vao sharing I have not only draw stage drop but also a huge gpu charge decrease
The only problem is that you should use glDrawXXBaseVertex or offsetIndices of your IndexArray

My bench in release this time
.............................................................. Cull       Draw        GPU          FPS
Pattern on all geometries with 1VAO/Geom   2            4            1.37            160
Pattern on all geometries with shared VAOs   2            2            0.47            200

So I think there's interest in sharing vaos


scrawl wrote:
> Hi,
> 
> please correct me if I'm wrong (I have a naive understanding of VAO). I don't see the point of VAO sharing. If a VAO can be "shared" between two Geometries, that means the Geometries have the same set of vertex arrays, correct? So then why use two separate Geometries to begin with if they are identical? You can re-use a Geometry by attaching it to multiple parents.
> 
> The only downside I could think of when re-using a Geometry is that a Node with more than one parent can cause problems (certain functions like getWorldMatrices() suddenly return multiple results). Or you might want to assign a different StateSet to each copy of the Geometry (but in that case you could decorate the Geometry with an intermediate node and set the StateSet there).
> 
> I guess this might be a case where the pre-OSG3.4 way of having a Geometry attached to a Geode instead of directly into the scene graph makes more sense. That way doing Geometry sharing doesn't result in a multi-parented graph...
> 
> Cheers,
> Jannik


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








More information about the osg-users mailing list