QRenderTargetSelector Class

(Qt3DRender::QRenderTargetSelector)

Provides a way of specifying a render target 更多...

头文件: #include <QRenderTargetSelector>
qmake: QT += 3drender
开始支持版本: Qt 5.7
Instantiated By: RenderTargetSelector
基类: Qt3DRender::QFrameGraphNode

属性

  • target : Qt3DRender::QRenderTarget *

公有函数

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

公有槽函数

void setTarget(QRenderTarget *target)

信号

void targetChanged(QRenderTarget *target)

受保护的函数

QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr)

其他继承的成员

  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

Provides a way of specifying a render target

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.

属性

target : Qt3DRender::QRenderTarget *

Holds the current render target

访问函数:

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

Notifier signal:

void targetChanged(QRenderTarget *target)

成员函数

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

Default constructs an instance of QRenderTargetSelector.

[protected] QRenderTargetSelector::QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

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

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

参见 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.

参见 outputs().