[osg-users] PrimitiveSets and performance

Glenn Waldron gwaldron at gmail.com
Fri Dec 2 08:13:52 PST 2016


In my experience VBOs that are too large will reduce performance (on NVIDIA
at least). So you need to cap the size you use for each draw call. OSG's
MergeGeometryVisitor has a parameter for "target number of vertices" that
defaults to 10K per primitive set. On modern cards this can definitely be
higher, but if you set it too high (in the millions for example)
performance will fall off a cliff. Where exactly depends on the hardware
and you will need to experiment to find a good value. Anyway, it would be
interesting to see whether something like glMultiDrawArrays would exhibit
the same behavior.

Hope this helps.

Glenn Waldron

On Fri, Dec 2, 2016 at 10:32 AM, Riccardo Corsi <riccardo.corsi at kairos3d.it>

> Hi all,
> I'm trying to find out the best geometries and primitive sets layout on a
> model that I'm using as performance benchmark.
> The model is quite heavy in terms of vertices and polygons, and everything
> is rendered at the moment with DrawArrays.
> In the attempt to reduce the draw calls, I've recombined the primitive
> sets contained in every geometry into a single primitive set.
> I expected draw/gpu time to improve, and I've found the exact opposite -
> find attached the 2 screenshots with the stats (before and after primitives
> merge).
> After merging the primitive sets I've also tried to force VBO usage
> instead of display lists, which improve things slightly, but always far
> worse than before merging.
> Can anyone comment on this result?
> Thank you,
> Riccardo
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161202/c2583d9a/attachment-0002.htm>

More information about the osg-users mailing list