QBlitFramebuffer — PyQt Documentation v6.9.0 (original) (raw)
PyQt6.Qt3DRender.QBlitFramebuffer
Inherits from QFrameGraphNode.
Description¶
FrameGraph node to transfer a rectangle of pixel values from one region of a render target to another.
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.
Note: 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.
Enums¶
InterpolationMethod
Specifies the interpolation applied if the image is stretched.
Member | Value | Description |
---|---|---|
Linear | 1 | Linear interpolation. |
Nearest | 0 | Nearest-neighbor interpolation. |
Methods¶
__init__(parent: QNode = None)
Constructs a new QBlitFramebuffer with the given parent.
destination() → QRenderTarget
Returns the destination render target.
See also
destinationAttachmentPoint() → AttachmentPoint
Returns the destination attachment point.
destinationRect() → QRectF
Returns the destination rectangle.
See also
interpolationMethod() → InterpolationMethod
Returns the interpolation method.
setDestination(QRenderTarget)
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.
Note: the source and destination must not refer to the same render target.
Note: 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.
setDestinationAttachmentPoint(AttachmentPoint)
Sets the destinationAttachmentPoint. Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.
setDestinationRect(QRectF)
Sets the destination rectangle to outputRect. The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
See also
setInterpolationMethod(InterpolationMethod)
Sets the interpolationMethod that is applied if the image is stretched. Defaults to Linear.
setSource(QRenderTarget)
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.
Note: the source and destination must not refer to the same render target.
Note: 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.
setSourceAttachmentPoint(AttachmentPoint)
Sets the sourceAttachmentPoint. Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.
setSourceRect(QRectF)
Sets the source rectangle to inputRect. The coordinates are assumed to follow the normal Qt coordinate system, meaning Y runs from top to bottom.
source() → QRenderTarget
Returns the source render target.
sourceAttachmentPoint() → AttachmentPoint
Returns the source attachment point.
sourceRect() → QRectF
Returns the source rectangle.
See also
Signals¶
destinationAttachmentPointChanged()
TODO
destinationChanged()
TODO
destinationRectChanged()
TODO
interpolationMethodChanged()
TODO
sourceAttachmentPointChanged()
TODO
sourceChanged()
TODO
sourceRectChanged()
TODO