<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 18 Aug 2015, at 09:44, John Vidar Larring <<a href="mailto:john.larring@chyronhego.com" class="">john.larring@chyronhego.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 13px;" class="">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-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 13px;" class=""></div></blockquote><div><br class=""></div><div>I’ve had to restructure osgViewerQt a little, because I didn’t try to get the CompositeViewer working yet.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 13px;" class=""><br class=""></div><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 13px;" class="">Also, I would like to know why you chose to use QOpenGLWindow rather QOpenGLWidget considering the Qt documenation below.<br class=""></div><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 13px;" class=""><br class="">From <a href="http://doc.qt.io/qt-5/qopenglwidget.html" target="_blank" class="">http://doc.qt.io/qt-5/qopenglwidget.html</a>:<br class=""><br class="">Adding a <a href="http://doc.qt.io/qt-5/qopenglwidget.html" target="_blank" class="">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" class="">QOpenGLWindow</a> with <a href="http://doc.qt.io/qt-5/qwidget.html#createWindowContainer" target="_blank" class="">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" class="">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" class="">QOpenGLWidget</a>.<br class=""></div></div></blockquote></div><br class=""><div class="">My personal take is that the QOpenGLWidget approach is inferior to the QOpenGLWindow+createWindowContainer approach, because of the slightly rapid way it was introduced, and the tradeoffs it makes in composting the different elements. However, this is subjective, and I will cheerfully support both, because as the documentation you pasted notes, there are cases where each approach is better or worse.</div><div class=""><br class=""></div><div class="">Note that from my understanding, the QOpenGLWidget approach will effectively force OSG into single threaded mode, becuase tge API gives no control over when makeCurrent is called, or which thread paintGL is called on. (But I need to check this with some colleagues and lazlo who created the code). In contrast my QWindow-based approach supports all the OSG threading modes directly.</div><div class=""><br class=""></div><div class="">I expect to end up with three different window options:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- osgQt::GraphicsWindowQt5 - gives you a QWindow, can be embedded with createWindowContainer or used standalone</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(QtGui dependency only)</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- osgQt::GraphicsWidget - gives you a QOpenGLWidget</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(QtWidget dependency)</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- osgQt::GraphicsWindowQtQuick - gives a window similar to QQuickWindow/QQuickView which can have a QML file setSource()-ed on it</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(QtGui + QtQuick2 dependency)</div><div class=""><br class=""></div><div class="">I have the first case done, will work on the second and third cases now, before worrying about QWidgetImage and other less common forms of integration.</div><div class=""><br class=""></div><div class="">Kind regards,</div><div class="">James</div><div class=""><br class=""></div></body></html>