[osg-users] Qt Quick and Android

Riccardo Corsi riccardo.corsi at kairos3d.it
Thu Sep 28 00:45:34 PDT 2017


Hi all,

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?

At the time when I wrote https://github.com/rickyviking/qmlosg (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.

Riccardo

On Mon, Sep 25, 2017 at 5:53 PM, James Turner <zakalawe at mac.com> wrote:

>
> On 22 Sep 2017, at 20:55, Kamil Zaripov <kamil at zaripov.net> wrote:
>
> I don’t sure that using QQuickWindow::beforeRendering() or
> QQuickWindow::afterRendering() signal will help since it also uses same
> OpenGL context as Qt Quick Scene Graph, but I will try it.
>
>
> 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.
>
> (And there is QQuickView::resetOpenGLState to avoid any state pollution)
>
> Of course the QQFBOItem approach is nice if you want to keep the contexts
> separate for some reason.
>
>
>
> Solution that uses QQuickRender sound good, I will lock at FlightGear
> sources.
>
>
> 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.
>
> 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)
>
> Kind regards,
> James
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170928/58aa9c91/attachment.htm>


More information about the osg-users mailing list