QBlitFramebuffer Class

class Qt3DRender::QBlitFramebuffer

FrameGraph node to transfer a rectangle of pixel values from one region of a render target to another. More...

Header: #include <QBlitFramebuffer>
qmake: QT += 3drender
Since: Qt 5.10
Instantiated By: BlitFramebuffer
Inherits: Qt3DRender::QFrameGraphNode

This class was introduced in Qt 5.10.

Public Types

enum InterpolationMethod { Nearest, Linear }

Properties

Public Functions

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 &destinationRect)
void setInterpolationMethod(Qt3DRender::QBlitFramebuffer::InterpolationMethod interpolationMethod)
void setSource(Qt3DRender::QRenderTarget *source)
void setSourceAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint)
void setSourceRect(const QRectF &sourceRect)
Qt3DRender::QRenderTarget *source() const
Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint() const
QRectF sourceRect() const

Signals

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.

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.

Member Type Documentation

enum QBlitFramebuffer::InterpolationMethod

Specifies the interpolation applied if the image is stretched.

ConstantValueDescription
Qt3DRender::QBlitFramebuffer::Nearest0Nearest-neighbor interpolation.
Qt3DRender::QBlitFramebuffer::Linear1Linear 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.

Note: the source and destination must not refer to the same render target.

Access functions:

Qt3DRender::QRenderTarget *destination() const
void setDestination(Qt3DRender::QRenderTarget *destination)

Notifier signal:

void destinationChanged()

destinationAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint

Specifies the target attachment point.

Access functions:

Qt3DRender::QRenderTargetOutput::AttachmentPoint destinationAttachmentPoint() const
void setDestinationAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint 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:

QRectF destinationRect() const
void setDestinationRect(const QRectF &destinationRect)

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.

Note: the source and destination must not refer to the same render target.

Access functions:

Qt3DRender::QRenderTarget *source() const
void setSource(Qt3DRender::QRenderTarget *source)

Notifier signal:

void sourceChanged()

sourceAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint

Specifies the source attachment point.

Access functions:

Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint() const
void setSourceAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint 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:

QRectF sourceRect() const
void setSourceRect(const QRectF &sourceRect)

Notifier signal:

void sourceRectChanged()