[osg-users] Reapply GL context

Robert Osfield robert.osfield at gmail.com
Wed Aug 23 02:19:28 PDT 2017

Hi Antoine,

On 23 August 2017 at 09:57, Antoine Rennuit <antoinerennuit at hotmail.com>

> I use a windowing system that already makes use of GL. I have the feeling
> that this windowing system breaks my OSG managed GL context.
> Is there a way I can save / reapply my OSG GL context before calling
> frame() (so as to make sure my rendering is not disturbed by my windowing
> system).

Integrating things the way you are wanting to is not directly supported by
the OSG, it's possible to do but awkward, you need to know more about the
internals of the OSG/OpenGL and the 3rd party GL code to be able to do it.

OpenGL has a glPushAttrib/glPopAttrib feature that can be used to save and
restore state.

The OSG also has various osg::State::haveApplied*() methods to telling the
OSG state tracking system that a particular element of state has changed.

I don't personally have expertise on the Qt side so really can't help you
with specifics, if others in the community have done what you are
attempting then they will be the most effective at helping you.  The best I
can do is provide some high level pointers about what is available on the
OSG side.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170823/f5d3d75c/attachment.htm>

More information about the osg-users mailing list