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

Julien Valentin julienvalentin51 at gmail.com
Sun Aug 14 15:21:21 PDT 2016


Hi,

Recently Robert opens a new branch for the integaration of VAO in osg.

I've thrown a fast look at it,but have not tested yet  -not enough HD space:/ so I can't give a full feedback
I can only compare with my own impl with this reduced perspective, I don't understand all so don't be regardant if i misunderstood the code.

In my implementation:
-I assumed the only way to fully take care of the performance bonus of VAO in osg was to share BO among geometries. 
 I use a singleton to manage bo sets involved in vaos, it concatenates bufferdata in these bo and so bos and vao are shared among geometries
-However concatenate arrays in a bo brings a problem of offset in bo so i have to quit glDrawElementsXXX to glDrawElemntsXXXbasevertex
So each arrays of a geometry must have the same start index in the bufferobjects and geometries should share the same bo set as often as possible

I did a test in debug build (on a GTX640) with a triangle indexed city and the default useVBO 
it originally frames at 40FPS
+adding bo sharing among geometries : 55FPS
+adding useVAO 70FPS (The Draw charge drops from 12 to 6 even if i unbind vao after each geom draw)

https://github dot com/mp3butcher/OpenSceneGraph

In the current branch:
-I like the idea of deporting vao in state..It seams a good place for them for state sorting.
-But I haven't spot the way intended to share VAO among Geometries:
*bo affectation to geoms is not managed (so do we have to assume user is in charge of sharing bo correctly among geoms?)
*it seams primset doesn't take the way of basevertex draw calls so I'm asking myself how could we manage basevertex when geoms arrays share same bos

I opened this thread, in order others can share their point view on the subject. What do you think of the current branch? How do you see the vao integration in osg? Which approach should be the flexier for the user? Are bufferObject should be entirely managed by osg?..And so much connected question on the subject...

So don't be shy and share your visions

Cheers,
Julien

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








More information about the osg-users mailing list