Provides a way of specifying the render surface. 更多...
头: | #include <QRenderSurfaceSelector> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
实例化: | RenderSurfaceSelector |
继承: | Qt3DRender::QFrameGraphNode |
QRenderSurfaceSelector (Qt3DCore::QNode * parent = nullptr) | |
QSize | externalRenderTargetSize () const |
QObject * | surface () const |
float | surfacePixelRatio () const |
void | setExternalRenderTargetSize (const QSize & size ) |
void | setSurface (QObject * surfaceObject ) |
void | setSurfacePixelRatio (float ratio ) |
void | externalRenderTargetSizeChanged (const QSize & size ) |
void | surfaceChanged (QObject * surface ) |
void | surfacePixelRatioChanged (float ratio ) |
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.
另请参阅 QWindow , QOffscreenSurface ,和 QSurface .
Holds the size of the external render target.
访问函数:
QSize | externalRenderTargetSize () const |
void | setExternalRenderTargetSize (const QSize & size ) |
通知程序信号:
void | externalRenderTargetSizeChanged (const QSize & size ) |
Holds the surface
访问函数:
QObject * | surface () const |
void | setSurface (QObject * surfaceObject ) |
通知程序信号:
void | surfaceChanged (QObject * surface ) |
Holds the surfacePixelRatio of the surface.
访问函数:
float | surfacePixelRatio () const |
void | setSurfacePixelRatio (float ratio ) |
通知程序信号:
void | surfacePixelRatioChanged (float ratio ) |
[explicit]
QRenderSurfaceSelector::
QRenderSurfaceSelector
(
Qt3DCore::QNode
*
parent
= nullptr)
Constructs QRenderSurfaceSelector with given parent .
[slot]
void
QRenderSurfaceSelector::
setExternalRenderTargetSize
(const
QSize
&
size
)
Sets render target size if different than underlying surface size. Tells picking the correct size.
注意: setter 函数对于特性 externalRenderTargetSize .
另请参阅 externalRenderTargetSize ().
[slot]
void
QRenderSurfaceSelector::
setSurface
(
QObject
*
surfaceObject
)
设置 surfaceObject .
注意: setter 函数对于特性 surface .
另请参阅 surface ().