On 5.3.2013 16:12, Gianni Ambrosio wrote:
Hi All, I'm experiencing an issue that seems related to the size of a osgQt::GLWidget. Since my case it is pretty hard to explain, first of all I would like to know if it is correct to completely override the QGLWidget::resizeEvent(QResizeEvent*) implementation. In fact, in a previous implementation of an AdapterWidget (derived from QGLWidget and embedding a osgViewer::GraphicsWindow) resizeGL(w, h) was reimplemented instead of resizeEvent(). Both methods are virtual of QGLWidget but resizeGL() is called by QGLWidget::resizeEvent(). The latest also does something more:Code: void QGLWidget::resizeEvent(QResizeEvent *) { Q_D(QGLWidget); if (!isValid()) return; makeCurrent(); if (!d->glcx->initialized()) glInit(); resizeGL(width(), height()); if (d->olcx) { makeOverlayCurrent(); resizeOverlayGL(width(), height()); } } That means osgQt::resizeEvent() implementation overrides the original code of QGLWidget. Is that really not necessary and can be correctly skipped?
I'm just guessing here but i think the QGLWidget's resizeEvent was intentionally suppressed by the author to prevent the execution of the makeCurrent() call. It is probably done so to avoid crashes when running osg in multi-threaded threading model.
Robert Milharcic _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

