diff options
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. |