QRenderSurfaceSelector Class
class Qt3DRender::QRenderSurfaceSelectorProvides a way of specifying the render surface. More...
Header: | #include <QRenderSurfaceSelector> |
qmake: | QT += 3drender |
Since: | Qt 5.7 |
Instantiated By: | RenderSurfaceSelector |
Inherits: | Qt3DRender::QFrameGraphNode |
This class was introduced in Qt 5.7.
Public Functions
QRenderSurfaceSelector(Qt3DCore::QNode *parent = nullptr) | |
void | setExternalRenderTargetSize(const QSize &size) |
void | setSurface(QObject *surfaceObject) |
Detailed Description
The Qt3DRender::QRenderSurfaceSelector can be used to select the surface, where Qt3D renders the content. The surface can either be window surface or offscreen surface. The externalRenderTargetSize is used to specify the actual size of the surface when offscreen surface is used.
When DPI scaling is used by the system, the logical surface size, which is used by mouse events, and the actual 'physical' size of the surface can differ. The surfacePixelRatio is the factor to convert the logical size to the physical size.
See also QWindow, QOffscreenSurface, and QSurface.
Member Function Documentation
QRenderSurfaceSelector::QRenderSurfaceSelector(Qt3DCore::QNode *parent = nullptr)
Constructs QRenderSurfaceSelector with given parent.
void QRenderSurfaceSelector::setExternalRenderTargetSize(const QSize &size)
Sets render target size if different than underlying surface size. Tells picking the correct size.
void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)
Sets surfaceObject.