FrameGraph node to transfer a rectangle of pixel values from one region of a render target to another. 更多...
头: | #include <QBlitFramebuffer> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
实例化: | BlitFramebuffer |
继承: | Qt3DRender::QFrameGraphNode |
enum | InterpolationMethod { Nearest, Linear } |
|
|
QBlitFramebuffer (Qt3DCore::QNode * parent = nullptr) | |
virtual | ~QBlitFramebuffer () |
Qt3DRender::QRenderTarget * | destination () const |
Qt3DRender::QRenderTargetOutput::AttachmentPoint | destinationAttachmentPoint () const |
QRectF | destinationRect () const |
Qt3DRender::QBlitFramebuffer::InterpolationMethod | interpolationMethod () const |
void | setDestination (Qt3DRender::QRenderTarget * destination ) |
void | setDestinationAttachmentPoint (Qt3DRender::QRenderTargetOutput::AttachmentPoint destinationAttachmentPoint ) |
void | setDestinationRect (const QRectF & outputRect ) |
void | setInterpolationMethod (Qt3DRender::QBlitFramebuffer::InterpolationMethod interpolationMethod ) |
void | setSource (Qt3DRender::QRenderTarget * source ) |
void | setSourceAttachmentPoint (Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint ) |
void | setSourceRect (const QRectF & inputRect ) |
Qt3DRender::QRenderTarget * | source () const |
Qt3DRender::QRenderTargetOutput::AttachmentPoint | sourceAttachmentPoint () const |
QRectF | sourceRect () const |
void | destinationAttachmentPointChanged () |
void | destinationChanged () |
void | destinationRectChanged () |
void | interpolationMethodChanged () |
void | sourceAttachmentPointChanged () |
void | sourceChanged () |
void | sourceRectChanged () |
This node inserts a
glBlitFrameBuffer
or an equivalent into the command stream. This provides a more efficient method for copying rectangles between textures or surface backbuffers wrapped by
QRenderTarget
than drawing textured quads. It also supports scaling with the specified interpolation method.
注意: In practice the QBlitFramebuffer node will often be used in combination with QNoDraw since a blit should not involve issuing draw calls for any entities.
Specifies the interpolation applied if the image is stretched.
常量 | 值 | 描述 |
---|---|---|
Qt3DRender::QBlitFramebuffer::Nearest
|
0
|
Nearest-neighbor interpolation. |
Qt3DRender::QBlitFramebuffer::Linear
|
1
|
Linear interpolation. |
Specifies the destination render target. When not set, the destination is assumed to be the default framebuffer (i.e. the backbuffer of the current surface), if there is one.
注意: the source and destination must not refer to the same render target.
访问函数:
Qt3DRender::QRenderTarget * | destination () const |
void | setDestination (Qt3DRender::QRenderTarget * destination ) |
通知程序信号:
void | destinationChanged () |
Specifies the target attachment point.
访问函数:
Qt3DRender::QRenderTargetOutput::AttachmentPoint | destinationAttachmentPoint () const |
void | setDestinationAttachmentPoint (Qt3DRender::QRenderTargetOutput::AttachmentPoint destinationAttachmentPoint ) |
通知程序信号:
void | destinationAttachmentPointChanged () |
Specifies the destination rectangle. The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
访问函数:
QRectF | destinationRect () const |
void | setDestinationRect (const QRectF & outputRect ) |
通知程序信号:
void | destinationRectChanged () |
Specifies the source render target. When not set, the source is assumed to be the default framebuffer (i.e. the backbuffer of the current surface), if there is one.
注意: the source and destination must not refer to the same render target.
访问函数:
Qt3DRender::QRenderTarget * | source () const |
void | setSource (Qt3DRender::QRenderTarget * source ) |
通知程序信号:
void | sourceChanged () |
Specifies the source attachment point.
访问函数:
Qt3DRender::QRenderTargetOutput::AttachmentPoint | sourceAttachmentPoint () const |
void | setSourceAttachmentPoint (Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint ) |
通知程序信号:
void | sourceAttachmentPointChanged () |
Specifies the source rectangle. The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
访问函数:
QRectF | sourceRect () const |
void | setSourceRect (const QRectF & inputRect ) |
通知程序信号:
void | sourceRectChanged () |
[explicit]
QBlitFramebuffer::
QBlitFramebuffer
(
Qt3DCore::QNode
*
parent
= nullptr)
Constructs a new QBlitFramebuffer with the given parent .
[virtual noexcept]
QBlitFramebuffer::
~QBlitFramebuffer
()
析构函数。
Returns the destination render target.
注意: Getter function for property destination.
另请参阅 setDestination ().
Returns the destination attachment point.
注意: Getter function for property destinationAttachmentPoint.
另请参阅 setDestinationAttachmentPoint ().
Returns the destination rectangle.
注意: Getter function for property destinationRect.
另请参阅 setDestinationRect ().
Returns the interpolation method.
注意: Getter function for property interpolationMethod.
另请参阅 setInterpolationMethod ().
Sets the destination render target. The default value is nullptr, in which case the destination is assumed to be be the default framebuffer (i.e. the backbuffer of the current surface), if there is one.
注意: the source and destination must not refer to the same render target.
注意: As with other nodes, destination gets automatically parented to the QBlitFramebuffer instance when no parent has been set. The lifetime is also tracked, meaning the destination reverts to nullptr in case the currently set destination 被销毁。
注意: setter 函数对于特性 destination .
另请参阅 destination ().
设置 destinationAttachmentPoint . Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.
注意: setter 函数对于特性 destinationAttachmentPoint .
另请参阅 destinationAttachmentPoint ().
Sets the destination rectangle to outputRect . The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
注意: setter 函数对于特性 destinationRect .
另请参阅 destinationRect ().
设置 interpolationMethod that is applied if the image is stretched. Defaults to Linear.
注意: setter 函数对于特性 interpolationMethod .
另请参阅 interpolationMethod ().
Sets the source render target. The default value is nullptr, in which case the source is assumed to be be the default framebuffer (i.e. the backbuffer of the current surface), if there is one.
注意: the source and destination must not refer to the same render target.
注意: As with other nodes, source gets automatically parented to the QBlitFramebuffer instance when no parent has been set. The lifetime is also tracked, meaning the source reverts to nullptr in case the currently set source 被销毁。
注意: setter 函数对于特性 source .
另请参阅 source ().
设置 sourceAttachmentPoint . Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.
注意: setter 函数对于特性 sourceAttachmentPoint .
另请参阅 sourceAttachmentPoint ().
Sets the source rectangle to inputRect . The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
注意: setter 函数对于特性 sourceRect .
另请参阅 sourceRect ().
Returns the source render target.
注意: getter 函数对于特性 source。
另请参阅 setSource ().
Returns the source attachment point.
注意: Getter function for property sourceAttachmentPoint.
另请参阅 setSourceAttachmentPoint ().
Returns the source rectangle.
注意: Getter function for property sourceRect.
另请参阅 setSourceRect ().