[osg-users] How to abort rendering

Robert Osfield robert.osfield at gmail.com
Mon Jan 8 06:05:35 PST 2018


Hi Claudio,

There is an rendering abort feature built into osg::State.  You can
have a global bool that you tell osg::State about via
osg::State::setAbortRenderingPtr(&myAbortBool);

This is crude sledge hammer though, it's meant for handling a user
pressing escape or similar abort.  Whether this is appropriate for you
usage I can't say.

The alternative would be to implement your own RenderBin variants that
have you won early abort mechanism built in.

However, unless you really really must have this feature and you have
proven beyond doubt that it' absolutely required then I'd suggest just
getting on with developing your application and just making sure it's
efficient rather than jump throw hoops because you think a feature
might be required.

Robert.

On 6 January 2018 at 21:26, Claudio Benghi <claudio.benghi at gmail.com> wrote:
> Hello everybody,
>
> I'm new on the forum, hopefully I'll be able to contribute a bit in the future.
>
> I'm reviving this old thread to ask if the approach suggested is still the best way to manage the interruption of the frame rendering.
>
> The approach I'm considering is to stop the rendering from the RenderBin class if the frame is taking too long to render and the camera has moved.
>
> This would make some elements disappear in some frames, but if the sorting is adequately controlled it might not not disrupt the view much.
>
> I guess I'm trying to implement sort a guaranteed minimum frame rate during manipulation events by dropping elements; is anything like this already implemented?
>
> Thanks,
> Claudio
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72668#72668
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list