<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Fabien,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">in your situation the approach suggested by Chris is certainly the most promising.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Create a second GL context (shared), render everything you need to with osg in the second context to an FBO target and have Qt retrieve the fbo's texture content, to display it in one of its widgets/primitives. </div><div class="gmail_default" style="font-family:tahoma,sans-serif">This way you don't need to know which GL states Qt/qml uses and/or modifies and you're sure neither qml nor osg rendering will be corrupted.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">You can find a sample integration I wrote some times ago here: <a href="https://github.com/rickyviking/qmlosg">https://github.com/rickyviking/qmlosg</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif">and a more recent example here: <a href="https://github.com/podsvirov/osgqtquick">https://github.com/podsvirov/osgqtquick</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Ricky</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 21, 2016 at 11:52 AM, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 21 November 2016 at 09:12, Fabien Boco <<a href="mailto:fabien.boco@gmail.com">fabien.boco@gmail.com</a>> wrote:<br>
> This is why I'm looking for an OpenGL ES alternative for glPush/PopAttrib which works fine on the Windows version application.<br>
<br>
<br>
</span>The alternative to using glPush/glPop on the OSG would be to dirty the<br>
associated modes and attributes that are tracked in osg::State. In<br>
osg::State there are series of haveApplied*() methods to help with<br>
tell the OSG's state tracking mechanism something has externally<br>
changed. This requires you to know what modes and attributes will<br>
have been changed by the 3rd party code so it's not an easy<br>
alternative to glPush/glPop.<br>
<br>
Personally I find Qt's approach of changing GL state problematic, I<br>
much prefer windowing libraries to just create a graphics context and<br>
leave GL work entirely to dedicated graphics libraries.<br>
<span class="HOEnZb"><font color="#888888"><br>
Robert.<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>