QBlitFramebuffer Class | Qt 3D 5.12.4

Qt 5.12 | Qt 3D | C++ Classes | QBlitFramebuffer

Qt 5.12.4 Reference Documentation

# QBlitFramebuffer 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

- List of all members, including inherited members
- Obsolete members

## Public Types

enum | InterpolationMethod { Nearest, Linear }

## Properties

- destination : Qt3DRender::QRenderTarget*
- destinationAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint
- destinationRect : QRectF
- interpolationMethod : InterpolationMethod

- source : Qt3DRender::QRenderTarget*
- sourceAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint
- sourceRect : QRectF

- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject

## Public Functions

| 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

- 1 public function inherited from Qt3DRender::QFrameGraphNode
- 13 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Signals

void | destinationAttachmentPointChanged()
void | destinationChanged()
void | destinationRectChanged()
void | interpolationMethodChanged()
void | sourceAttachmentPointChanged()
void | sourceChanged()
void | sourceRectChanged()

- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject

## Static Public Members

const QMetaObject | staticMetaObject

- 9 static public members inherited from QObject

### Additional Inherited Members

- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
- 1 protected function inherited from Qt3DRender::QFrameGraphNode
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject

## Detailed 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.

## Member Type Documentation

### enum QBlitFramebuffer::InterpolationMethod

## Property Documentation

### destination : Qt3DRender::QRenderTarget*

Access functions:

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

Notifier signal:

void | destinationChanged()

### destinationAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint

Access functions:

Qt3DRender::QRenderTargetOutput::AttachmentPoint | destinationAttachmentPoint() const
void | setDestinationAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint destinationAttachmentPoint)

Notifier signal:

void | destinationAttachmentPointChanged()

### destinationRect : QRectF

Access functions:

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

Notifier signal:

void | destinationRectChanged()

### interpolationMethod : InterpolationMethod

Access functions:

Qt3DRender::QBlitFramebuffer::InterpolationMethod | interpolationMethod() const
void | setInterpolationMethod(Qt3DRender::QBlitFramebuffer::InterpolationMethod interpolationMethod)

Notifier signal:

void | interpolationMethodChanged()

### source : Qt3DRender::QRenderTarget*

Access functions:

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

Notifier signal:

void | sourceChanged()

### sourceAttachmentPoint : Qt3DRender::QRenderTargetOutput::AttachmentPoint

Access functions:

Qt3DRender::QRenderTargetOutput::AttachmentPoint | sourceAttachmentPoint() const
void | setSourceAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint)

Notifier signal:

void | sourceAttachmentPointChanged()

### sourceRect : QRectF

Access functions:

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

Notifier signal:

void | sourceRectChanged()

## Member Function Documentation

### 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.

Note: Getter function for property destination.

See also setDestination().

### Qt3DRender::QRenderTargetOutput::AttachmentPoint QBlitFramebuffer::destinationAttachmentPoint() const

Returns the destination attachment point.

Note: Getter function for property destinationAttachmentPoint.

See also setDestinationAttachmentPoint().

### QRectF QBlitFramebuffer::destinationRect() const

Returns the destination rectangle.

Note: Getter function for property destinationRect.

See also setDestinationRect().

### Qt3DRender::QBlitFramebuffer::InterpolationMethod QBlitFramebuffer::interpolationMethod() const

Returns the interpolation method.

Note: Getter function for property interpolationMethod.

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.

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.

Note: Setter function for property destination.

See also destination().

### void QBlitFramebuffer::setDestinationAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint destinationAttachmentPoint)

Sets the destinationAttachmentPoint. Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.

Note: Setter function for property destinationAttachmentPoint.

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.

Note: Setter function for property destinationRect.

See also destinationRect().

### void QBlitFramebuffer::setInterpolationMethod(Qt3DRender::QBlitFramebuffer::InterpolationMethod interpolationMethod)

Sets the interpolationMethod that is applied if the image is stretched. Defaults to Linear.

Note: Setter function for property interpolationMethod.

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.

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.

Note: Setter function for property source.

See also source().

### void QBlitFramebuffer::setSourceAttachmentPoint(Qt3DRender::QRenderTargetOutput::AttachmentPoint sourceAttachmentPoint)

Sets the sourceAttachmentPoint. Defaults to Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0.

Note: Setter function for property sourceAttachmentPoint.

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.

Note: Setter function for property sourceRect.

See also sourceRect().

### Qt3DRender::QRenderTarget *QBlitFramebuffer::source() const

Returns the source render target.

Note: Getter function for property source.

See also setSource().

### Qt3DRender::QRenderTargetOutput::AttachmentPoint QBlitFramebuffer::sourceAttachmentPoint() const

Returns the source attachment point.

Note: Getter function for property sourceAttachmentPoint.

See also setSourceAttachmentPoint().

### QRectF QBlitFramebuffer::sourceRect() const

Returns the source rectangle.

Note: Getter function for property sourceRect.

See also setSourceRect().