diff options
author | Paul Olav Tvete <paul.tvete@digia.com> | 2013-12-18 14:48:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-12 20:12:17 +0100 |
commit | eacd58d4e78e7238ba5fcca90ba960aaf3ebd263 (patch) | |
tree | 779bf1735aecb7985bc3136264b9147eb23d5374 /src/gui/kernel/qsurface.cpp | |
parent | 5ae5bebb93ec38e17c0dcb9bec47e0ebfbce4937 (diff) |
Enabling QQuickWidget and QOpenGLWidget
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>
Diffstat (limited to 'src/gui/kernel/qsurface.cpp')
-rw-r--r-- | src/gui/kernel/qsurface.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp index a943639d5f..a27bdaccde 100644 --- a/src/gui/kernel/qsurface.cpp +++ b/src/gui/kernel/qsurface.cpp @@ -74,6 +74,9 @@ QT_BEGIN_NAMESPACE a software rasterizer like Qt's raster paint engine. \value OpenGLSurface The surface is an OpenGL compatible surface and can be used in conjunction with QOpenGLContext. + \value RasterGLSurface The surface can be rendered to using a software rasterizer, + and also supports OpenGL. This surface type is intended for internal Qt use, and + requires the use of private API. */ @@ -84,6 +87,19 @@ QT_BEGIN_NAMESPACE */ /*! + Returns true if the surface is OpenGL compatible and can be used in + conjunction with QOpenGLContext; otherwise returns false. + + \since 5.3 +*/ + +bool QSurface::supportsOpenGL() const +{ + SurfaceType type = surfaceType(); + return type == OpenGLSurface || type == RasterGLSurface; +} + +/*! \fn QPlatformSurface *QSurface::surfaceHandle() const Returns a handle to the platform-specific implementation of the surface. |