summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qopenglwidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Avoid drawing when the QOpenGLWidget isn't mappedJocelyn Turcotte2014-05-081-1/+1
| | | | | | | | | | | | | | Do as QGLWidget::updateGL does and avoid calling paintGL in updateGL when we we don't have a valid QSurface to draw on. We currently end up calling makeCurrent on the context with a null QSurface in that case, which is the equivalend of doneCurrent, and causes QOpenGLContext::currentContext to return null later when paintGL is called on the subclass. Change-Id: I712ee59274855457b0e4de3757754f56b3528955 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QOpenGLWidget: Avoid crashing if updateGL is called before the first resizeJocelyn Turcotte2014-04-091-0/+3
| | | | | Change-Id: I9e7788334de98b35dc5d6beee97a63783a1fe267 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix a crash on startup with QOpenGLWidgetJocelyn Turcotte2014-04-071-1/+2
| | | | | | | | | | | After c4aabeb2b82d777bb555f836f55e1f7ae4fb4581 we now try to access q_ptr in QWidgetPrivate::setRenderToTexture. QOpenGLWidget needs to delay this call after the QObject constructor is done to make sure that setTextureChildSeen doesn't dereference q_ptr before it has been initialized. Change-Id: Icaee82c8b806f42bc7614b0ac6fe4e6026331750 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Enable the depth and stencil buffers by default in QOpenGLWidgetJocelyn Turcotte2014-04-021-1/+1
| | | | | | | | | | | | | QGLWidget rendered to the default framebuffer, which had a depth and stencil buffer attached by default. Keep this behavior by adding the attachments to the FBO by default in QOpenGLWidget. Change-Id: I6f72a444eac3d8eabb7a539ad12216f1e5d2183d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QOpenGLWidget retina support.Morten Johan Sørvig2014-03-201-1/+1
| | | | | | | Use device pixels where appropriate. Change-Id: Ia953e6da4034eecbfccf798701ec1b850eea9d5b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Avoid using direct OpenGL calls in gui and widgetsLaszlo Agocs2014-03-101-7/+10
| | | | | Change-Id: I5d88a2e204ca23e178a4e3044b9cb13392c3e763 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Enabling QQuickWidget and QOpenGLWidgetPaul Olav Tvete2014-02-121-0/+183
Enable child widgets (without a native window) that render to an FBO and are composed with the raster backingstore by the platform plugin. A preliminary version of QOpenGLWidget is included as private API. Change-Id: I8f984a4d7db285069ce3d6564707942c823d890d Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>