[osg-users] Maximizing rendering throughput

Robert Osfield robert.osfield at gmail.com
Fri Oct 23 12:36:51 PDT 2015


Hi Sebastian,

On 23 October 2015 at 18:07, Sebastian Messerschmidt <
sebastian.messerschmidt at gmx.de> wrote:

> Thanks for the explanation. I'm still puzzled by the question which
> elements can be updated in the update-phase without setting them to
> dynamic. I always was under the impression, that the update is performed
> before cull/draw are actually executed.
> Right now I need some thread safe "time slot" to change the scene graph in
> terms of inserting nodes, updating transforms etc. I guess it is totally
> okay to do this in the update callback/operation.
> But for changes to images, text, an arrays of drawables I need to set them
> to DYNAMIC if I understood you correctly. So basically what I got is, that
> I could put the draw of those elements as far to beginning of the draw as
> possible.
>

Have a look through the archives, I've written a lot about the
DrawThreadPerContext model that I introduced back in the OSG-2.0 days.


> As for the double buffering: Can it be done at drawable level? Like
> swapping the front/back drawable back and forth, effectively doubling the
> geometry/image space needed?
>

Yes, you'd do the double buffering at the StateSet and Drawable level.
Essentially you'd have Node's in the scene graph manage two alternatives
and have each update, cull traversal for a frame work on one version, and
draw to work on the other. You could double buffer whole subgraphs if you
wanted.

Within these double buffered StateSet and Drawable you can share all the
arrays/stateattributes that are constant and just have the changing parts
duplicated.

This is advanced OSG usage though, it may well be that this added
complexity isn't required at all.  You haven't really told us anything
about your application usage and confirmed bottlenecks to know what is the
best route for your application to get better performance.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151023/2cac555e/attachment-0003.htm>


More information about the osg-users mailing list