<div dir="ltr"><div style=""><span style="font-size:13px">Hi James,</span></div><span style="font-size:13px"><div><span style="font-size:13px"><br></span></div>I've attempted to update the osgQt code to use the new QOpenGLWidget rather than the deprecated QGLWindow currently subclassed, but I've hit a snag with the the order of when when QOpenGLContext is created and when CompositeViewer expects it to be available (Probably a silly mistake that I'm overlooking). Have you had to restructure the osgQt::GraphicsWindow or osgQt::GLWindow class and the osgViewerQt example in any way to get your implementation to work? </span><br style="font-size:13px"><div style="font-size:13px"><br></div><div style="font-size:13px">Also, I would like to know why you chose to use QOpenGLWindow rather QOpenGLWidget considering the Qt documenation below.<br></div><div style="font-size:13px"><br>From <a href="http://doc.qt.io/qt-5/qopenglwidget.html" target="_blank">http://doc.qt.io/qt-5/qopenglwidget.html</a>:<br><br>Adding a <a href="http://doc.qt.io/qt-5/qopenglwidget.html" target="_blank">QOpenGLWidget</a> into a window turns on OpenGL-based compositing for the entire window. In some special cases this may not be ideal, and the old QGLWidget-style behavior with a separate, native child window is desired. Desktop applications that understand the limitations of this approach (for example when it comes to overlaps, transparency, scroll views and MDI areas), can use <a href="http://doc.qt.io/qt-5/qopenglwindow.html" target="_blank">QOpenGLWindow</a> with <a href="http://doc.qt.io/qt-5/qwidget.html#createWindowContainer" target="_blank">QWidget::createWindowContainer</a>(). This is a modern alternative to QGLWidget and is faster than <a href="http://doc.qt.io/qt-5/qopenglwidget.html" target="_blank">QOpenGLWidget</a> due to the lack of the additional composition step. It is strongly recommended to limit the usage of this approach to cases where there is no other choice. Note that this option is not suitable for most embedded and mobile platforms, and it is known to have issues on certain desktop platforms (e.g. OS X) too. The stable, cross-platform solution is always <a href="http://doc.qt.io/qt-5/qopenglwidget.html" target="_blank">QOpenGLWidget</a>.<br><br></div><div style="font-size:13px">Would love to see / contribute / comment on your osg qt5 integration. <br></div><div style="font-size:13px"><br></div><div style="font-size:13px">Best  regards,<br></div><div style="font-size:13px">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 13, 2015 at 10:10 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">Hi,<br>
<br>
I’ve been re-working the osgQt code to fit the Qt5 windowing model closer - I have a basic proof of concept working, which I will clean up and publish shortly. This provides an osgViewer backed by a QWindow; so the widget and opengl module dependency is gone, the only Qt5 modules needed are Gui and Core.<br>
<br>
A QWindow can be embedded in a traditional widget based application using QWidget::createWindowContainer; I will create an example of this approach as part of my submission. (And the performance of this approach is the same as the old QGLWidget inside GraphicsWindowQt).<br>
<br>
What I’d like to know, is what other uses cases are relevant for people:<br>
<br>
- I could re-create QWidgetImage, but using QWidget::render and avoiding any reliance on QGraphicsScene or QGraphicsProxy. If people have uses cases for QWidgetImage, that would be good to know. Especially, are you embedding ‘a few buttons’ or entire application layouts? Correctly handling keyboard focus is obviously something that’s been difficult in the current code and I expect to be similarly awkward.<br>
<br>
- QtQuick2 integration; I’ll create a custom QQ2 item which renders OSG via a framebuffer. This will allow an OSG scene to be integrated with QQ2 UI, with reasonable performance. I would welcome any input from people who need this, and your particular requirements, especially the API for binding the osg Scene to the QML item. But, see the next point:<br>
<br>
- I /hope/ to create a GraphicsWindowQtQuick which allows the common case of an OSG scene, with a QQ2 scene overlaid. This has some complexities to support the different OSG threading models and context lifetime, but it feels like such a common and desirable use case it’s worth spending time on.<br>
<br>
- does anyone have a use for an equivalent of QWidgetImage for QtQuick2? I.e a chunk of QQ2 content displayed as a texture.<br>
<br>
My intention would be to have any new classes live alongside the existing Qt4 support, since I don’t want to touch that code at all, for fear of regressing some aspect of the Qt4 support which someone may be relying upon in existing code.<br>
<br>
If you have thoughts in this area, interesting requirements which might guide my approach, or test-case you can share, please let me know. I will definitely  be doing the basic pieces outlined above, but whether I work on the QWidgetImage piece in particular depends very much on what response I get.<br>
<br>
Kind regards,<br>
James Turner<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
This email was Anti Virus checked by Astaro Security Gateway. <a href="http://www.sophos.com" rel="noreferrer" target="_blank">http://www.sophos.com</a><br>
<br>
<br>
--<br>
This email was Anti Virus checked by Astaro Security Gateway. <a href="http://www.sophos.com" rel="noreferrer" target="_blank">http://www.sophos.com</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"> <br>
<a href="http://chyronhego.com/press-release/chyronhego-nab-show-2015-product-preview" target="_blank"> </a><a href="http://chyronhego.com/press-release/chyronhego-nab-show-2015-product-preview" target="_blank"><img alt="" src="http://logo.chyronhego.net/IBC-2015.jpg" style="width:350px;height:50px"></a><br>
<br>
<span style="font-family:arial,helvetica,sans-serif"><span style="font-size:11px"><strong>John Vidar Larring</strong> <strong>| <span style="color:rgb(169,169,169)"><em>Senior Developer</em></span></strong><br>
<br>
<strong>ChyronHego Norge AS</strong> <strong>- </strong>Sandakerveien 114a, 0484 Oslo, Norway<br>
Office. +47 2279 7030 - Mobile.+47 4889 9795 - <a href="http://www.chyronhego.com" target="_blank">www.chyronhego.com</a></span></span></div>
</div>