QRenderTargetSelector Class

(Qt3DRender::QRenderTargetSelector)

Provides a way of specifying a render target. More...

Header: #include <QRenderTargetSelector>
qmake: QT += 3drender
Since: Qt 5.7
Instantiated By: RenderTargetSelector
Inherits: Qt3DRender::QFrameGraphNode

This class was introduced in Qt 5.7.

Properties

  • target : Qt3DRender::QRenderTarget*

Public Functions

QRenderTargetSelector(Qt3DCore::QNode *parent = nullptr)
QVector<QRenderTargetOutput::AttachmentPoint> outputs() const
void setOutputs(const QVector<QRenderTargetOutput::AttachmentPoint> &buffers)
Qt3DRender::QRenderTarget *target() const

Public Slots

void setTarget(Qt3DRender::QRenderTarget *target)

Signals

void targetChanged(Qt3DRender::QRenderTarget *target)

Detailed Description

A Qt3DRender::QRenderTargetSelector is used to select active Qt3DRender::QRenderTarget for the FrameGraph. When QRenderTargetSelector is present in the FrameGraph, the rendering is directed into QTexture objects or draw buffers instead of the surface specified in the Qt3DRender::QRenderSurfaceSelector. A render buffer is automatically generated for an attachment point if drawBuffers contain attachment point that any output in the QRenderTarget do not specify. If the drawBuffers is empty, the renderer will default to using all the outputs in QRenderTarget.

Property Documentation

target : Qt3DRender::QRenderTarget*

Holds the current render target

Access functions:

Qt3DRender::QRenderTarget *target() const
void setTarget(Qt3DRender::QRenderTarget *target)

Notifier signal:

void targetChanged(Qt3DRender::QRenderTarget *target)

Member Function Documentation

QRenderTargetSelector::QRenderTargetSelector(Qt3DCore::QNode *parent = nullptr)

Constructs QRenderTargetSelector with given parent.

QVector<QRenderTargetOutput::AttachmentPoint> QRenderTargetSelector::outputs() const

Returns the list of draw buffers for the current Qt3DRender::QRenderTargetSelector instance.

See also setOutputs().

void QRenderTargetSelector::setOutputs(const QVector<QRenderTargetOutput::AttachmentPoint> &buffers)

Sets the draw buffers to be used. The draw buffers should be matching the Qt3DRender::QRenderTargetOutput::AttachmentPoint defined in the attachments of the Qt3DRender::QRenderTarget associated to the Qt3DRender::QRenderTargetSelector instance.

Note: At render time, if no draw buffer has been specified, the renderer will default to using all the attachments' draw buffers.

See also outputs().

© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.