[osg-users] Qt Quick and Android
James Turner
zakalawe at mac.com
Mon Sep 25 08:53:59 PDT 2017
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170925/6070482b/attachment.htm>
More information about the osg-users
mailing list