<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi all,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">James can you just confirm that, with the QQuickRenderControl approach, it's no more mandatory to have the main application loop handled by a Qt application class?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">At the time when I wrote <a href="https://github.com/rickyviking/qmlosg" target="_blank" style="font-family:arial,sans-serif;font-size:12.8px">https://github.com/<wbr>rickyviking/qmlosg</a> (probably it was against Qt 4.8) the only option available was to render custom GL stuff within a QtQuick node, and as such I had opted for osgViewer to render into an FBO created on a separate GL context, to avoid any conflict between the GL state used/updated by OSG and the one used by Qt to render its own widgets.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Riccardo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 25, 2017 at 5:53 PM, James Turner <span dir="ltr"><<a href="mailto:zakalawe@mac.com" target="_blank">zakalawe@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On 22 Sep 2017, at 20:55, Kamil Zaripov <<a href="mailto:kamil@zaripov.net" target="_blank">kamil@zaripov.net</a>> wrote:</div><br class="m_-3868033204668011890Apple-interchange-newline"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I don’t sure that using QQuickWindow::beforeRendering(<wbr>) or QQuickWindow::afterRendering() signal will help since it also uses same OpenGL context as Qt Quick Scene Graph, but I will try it.</div></div></blockquote><div><br></div></span><div>Is that a problem? Keep in mind you can set any QSurfaceFormat as the default (before creating the first QQuickWindow, if you want to work on Mac) and hence request an arbitrary frame-buffer format or context profile, with the Qt API, and QtQuick can still use it.</div><div><br></div><div>(And there is QQuickView::resetOpenGLState to avoid any state pollution)</div><div><br></div><div>Of course the QQFBOItem approach is nice if you want to keep the contexts separate for some reason.</div><span class=""><div><br></div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Solution that uses QQuickRender sound good, I will lock at FlightGear sources.</div></div></blockquote></span></div><br><div>The QQuickRenderControl part isn’t pushed to FlightGear yet, I have it on a local branch since right now it’s not threadsafe, until I find a safe way to run QQuickRenderControl::sync from the OSG graphics thread, but with the main thread guaranteed to be locked. I can guess a few solutions to that but I’m hoping some people more familiar with the threading in osgViewer[base] will have some definitive answers.</div><div><br></div><div>BTW both of my solutions above rely on using my GraphicsWindowQt5 which is a port+evolution of the old GraphicsWindowQt5 to QWIndow+QOpenGLContext; that part /is/ in FlightGear already but I’m still debugging some issues, especially mouse-pointer-warping, which FlightGear uses, is not working reliably compared to the ‘native’ GraphicsWindows (Cocoa, Win32, X11, etc)</div><div><br></div><div>Kind regards,</div><div>James</div></div><br>______________________________<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>
<br></blockquote></div><br></div>