QBlitFramebuffer Class▲
-
Header: QBlitFramebuffer
-
Since: Qt 5.10
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
-
qmake: QT += 3drender
-
Inherited By:
-
Instantiated By: qml-qt3d-render-blitframebuffer.xml
-
Inherits: Qt3DRender::QFrameGraphNode
-
Group: QBlitFramebuffer is part of framegraph
Detailed Description▲
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.
Member Type Documentation▲
enum QBlitFramebuffer::InterpolationMethod▲
Specifies the interpolation applied if the image is stretched.
Constant |
Value |
Description |
---|---|---|
Qt3DRender::QBlitFramebuffer::Nearest |
0 |
Nearest-neighbor interpolation. |
Qt3DRender::QBlitFramebuffer::Linear |
1 |
Linear interpolation. |
Property Documentation▲
destination : Qt3DRender::QRenderTarget*▲
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.
Access functions:
-
*destination() const
-
void setDestination( *destination)
Notifier signal:
-
void destinationChanged()
destinationAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint▲
Specifies the target attachment point.
Access functions:
-
destinationAttachmentPoint() const
-
void setDestinationAttachmentPoint( destinationAttachmentPoint)
Notifier signal:
-
void destinationAttachmentPointChanged()
destinationRect : QRectF▲
Specifies the destination rectangle. The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
Access functions:
-
destinationRect() const
-
void setDestinationRect(const &outputRect)
Notifier signal:
-
void destinationRectChanged()
source : Qt3DRender::QRenderTarget*▲
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.
Access functions:
Notifier signal:
-
void sourceChanged()
sourceAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint▲
Specifies the source attachment point.
Access functions:
-
sourceAttachmentPoint() const
-
void setSourceAttachmentPoint( sourceAttachmentPoint)
Notifier signal:
-
void sourceAttachmentPointChanged()
sourceRect : QRectF▲
Specifies the source rectangle. The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
Access functions:
-
sourceRect() const
-
void setSourceRect(const &inputRect)
Notifier signal:
-
void sourceRectChanged()
Member Function Documentation▲
[explicit] QBlitFramebuffer::QBlitFramebuffer(Qt3DCore::QNode *parent = nullptr)▲
Constructs a new QBlitFramebuffer with the given parent.
[virtual] QBlitFramebuffer::~QBlitFramebuffer()▲
Destructor.
Qt3DRender::QRenderTarget *QBlitFramebuffer::destination() const▲
Returns the destination render target.
Getter function for property destination.
See Also▲
See also setDestination()
Qt3DRender::QRenderTargetOutput::AttachmentPoint QBlitFramebuffer::destinationAttachmentPoint() const▲
Returns the destination attachment point.
Getter function for property destinationAttachmentPoint.
See Also▲
See also setDestinationAttachmentPoint()
QRectF QBlitFramebuffer::destinationRect() const▲
Returns the destination rectangle.
Getter function for property destinationRect.
See Also▲
See also setDestinationRect()
Qt3DRender::QBlitFramebuffer::InterpolationMethod QBlitFramebuffer::interpolationMethod() const▲
Returns the interpolation method.
Getter function for property interpolationMethod.
See Also▲
See also setInterpolationMethod()
void QBlitFramebuffer::setDestination(Qt3DRender::QRenderTarget *destination)▲
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 is destroyed.
Setter function for property destination.
See Also▲
See also destination()
void QBlitFramebuffer::setDestinationAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint destinationAttachmentPoint)▲
Sets the destinationAttachmentPoint. Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.
Setter function for property destinationAttachmentPoint.
See Also▲
See also destinationAttachmentPoint()
void QBlitFramebuffer::setDestinationRect(const QRectF &outputRect)▲
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 function for property destinationRect.
See Also▲
See also destinationRect()
void QBlitFramebuffer::setInterpolationMethod(Qt3DRender::QBlitFramebuffer::InterpolationMethod interpolationMethod)▲
Sets the interpolationMethod that is applied if the image is stretched. Defaults to Linear.
Setter function for property interpolationMethod.
See Also▲
See also interpolationMethod()
void QBlitFramebuffer::setSource(Qt3DRender::QRenderTarget *source)▲
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 is destroyed.
Setter function for property source.
See Also▲
See also source()
void QBlitFramebuffer::setSourceAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint)▲
Sets the sourceAttachmentPoint. Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.
Setter function for property sourceAttachmentPoint.
See Also▲
See also sourceAttachmentPoint()
void QBlitFramebuffer::setSourceRect(const QRectF &inputRect)▲
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 function for property sourceRect.
See Also▲
See also sourceRect()
Qt3DRender::QRenderTarget *QBlitFramebuffer::source() const▲
Returns the source render target.
Getter function for property source.
See Also▲
See also setSource()
Qt3DRender::QRenderTargetOutput::AttachmentPoint QBlitFramebuffer::sourceAttachmentPoint() const▲
Returns the source attachment point.
Getter function for property sourceAttachmentPoint.
See Also▲
See also setSourceAttachmentPoint()
QRectF QBlitFramebuffer::sourceRect() const▲
Returns the source rectangle.
Getter function for property sourceRect.
See Also▲
See also setSourceRect()