CopperSpice API
1.9.2
|
The QSurface class is an abstraction of renderable surfaces. More...
Public Types | |
enum | SurfaceClass |
enum | SurfaceType |
Public Methods | |
virtual | ~QSurface () |
virtual QSurfaceFormat | format () const = 0 |
virtual QSize | size () const = 0 |
bool | supportsOpenGL () const |
SurfaceClass | surfaceClass () const |
virtual QPlatformSurface * | surfaceHandle () const = 0 |
virtual SurfaceType | surfaceType () const = 0 |
Protected Methods | |
QSurface (SurfaceClass type) | |
The QSurface class is an abstraction of renderable surfaces. The size of the surface is accessible with the size() method. The rendering specific attributes of the surface are accessible through the format() method.
The SurfaceClass enum describes the actual subclass of the surface.
Constant | Value | Description |
---|---|---|
QSurface::Window | 0 | Surface is an instance of QWindow |
QSurface::Offscreen | 1 | Surface is an instance of QOffscreenSurface |
The SurfaceType enum describes what type of surface this is.
Constant | Value | Description |
---|---|---|
QSurface::RasterSurface | 0 | Surface is composed of pixels and can be rendered to using a software rasterizer like the raster paint engine. |
QSurface::OpenGLSurface | 1 | Surface is an OpenGL compatible surface and can be used in conjunction with QOpenGLContext. |
QSurface::RasterGLSurface | 2 | Surface can be rendered to using a software rasterizer, and also supports OpenGL. This surface type is intended for internal use and requires the use of private API. |
QSurface::VulkanSurface | 3 | Surface is a Vulkan compatible surface and can be used in conjunction with the Vulkan graphics API. |
|
virtual |
Destroys the surface.
|
explicitprotected |
Creates a surface with the given type.
|
pure virtual |
Returns the format of the surface.
Implemented in QWindow::format(), QOffscreenSurface::format()
|
pure virtual |
Returns the size of the surface in pixels.
Implemented in QWindow::size(), QOffscreenSurface::size()
bool QSurface::supportsOpenGL | ( | ) | const |
Returns true if the surface is OpenGL compatible and can be used in conjunction with QOpenGLContext, otherwise returns false.
QSurface::SurfaceClass QSurface::surfaceClass | ( | ) | const |
Returns the surface class of this surface.
|
pure virtual |
Returns a handle to the platform specific implementation of the surface.
|
pure virtual |
Returns the type of the surface.
Implemented in QWindow::surfaceType(), QOffscreenSurface::surfaceType()