QRenderPass Class


Encapsulates a Render Pass. More...

Header: #include <QRenderPass>
qmake: QT += 3drender
Since: Qt 5.7
Instantiated By: RenderPass
Inherits: Qt3DCore::QNode


Public Functions

QRenderPass(Qt3DCore::QNode *parent = nullptr)
void addFilterKey(QFilterKey *filterKey)
void addParameter(QParameter *parameter)
void addRenderState(QRenderState *state)
QVector<QFilterKey *> filterKeys() const
QVector<QParameter *> parameters() const
void removeFilterKey(QFilterKey *filterKey)
void removeParameter(QParameter *parameter)
void removeRenderState(QRenderState *state)
QVector<QRenderState *> renderStates() const
QShaderProgram *shaderProgram() const

Public Slots

void setShaderProgram(QShaderProgram *shaderProgram)


void shaderProgramChanged(QShaderProgram *shaderProgram)

Protected Functions

QRenderPass(QRenderPassPrivate &dd, Qt3DCore::QNode *parent = nullptr)
typedef ParameterList

Additional Inherited Members

  • 11 static public members inherited from QObject

Detailed Description

Encapsulates a Render Pass.

A Qt3DRender::QRenderPass specifies a single rendering pass - an instance of shader program execution - used by Qt3DRender::QTechnique. Render pass consists of a Qt3DRender::QShaderProgram and a list of Qt3DRender::QFilterKey objects, a list of Qt3DRender::QRenderState objects and a list of Qt3DRender::QParameter objects.

QRenderPass executes the QShaderProgram using the given render states and parameters when its filter keys match the filter keys in Qt3DRender::QRenderPassFilter or when no filter keys are specified and no QRenderPassFilter is present in the FrameGraph.

Property Documentation

shaderProgram : Qt3DRender::QShaderProgram *

Specifies the shader program to be used for this render pass.

Access functions:

QShaderProgram *shaderProgram() const
void setShaderProgram(QShaderProgram *shaderProgram)

Notifier signal:

void shaderProgramChanged(QShaderProgram *shaderProgram)

Member Function Documentation

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

Constructs a new QRenderPass with the specified parent.

[protected] QRenderPass::QRenderPass(QRenderPassPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

void QRenderPass::addFilterKey(QFilterKey *filterKey)

Adds filterKey to the Qt3DRender::QRenderPass local filter keys.

void QRenderPass::addParameter(QParameter *parameter)

Add parameter to the render pass' parameters.

void QRenderPass::addRenderState(QRenderState *state)

Adds a render state to the rendering pass. That implies that when the pass is executed at render time, the globally set render state will be modifed by the states defined locally by the Qt3DRender::QRenderPass.

Note: not defining any Qt3DRender::QRenderState in a pass will result in the pass using the globally set render state for a given FrameGraph branch execution path.

QVector<QFilterKey *> QRenderPass::filterKeys() const

Returns the list of Qt3DRender::QFilterKey key objects making up the filter keys of the Qt3DRender::QRenderPass.

QVector<QParameter *> QRenderPass::parameters() const

Returns a vector of the render pass' current parameters

void QRenderPass::removeFilterKey(QFilterKey *filterKey)

Removes filterKey from the Qt3DRender::QRenderPass local filter keys.

void QRenderPass::removeParameter(QParameter *parameter)

Remove parameter from the render pass' parameters.

void QRenderPass::removeRenderState(QRenderState *state)

Removes state from the Qt3DRender::QRenderPass local render state.

QVector<QRenderState *> QRenderPass::renderStates() const

Returns the list of Qt3DRender::QRenderState state objects making up the render state of the Qt3DRender::QRenderPass.

Related Non-Members

typedef Qt3DRender::ParameterList

A list of Qt3DRender::QParameter parameters.

© 2017 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.