QStateSet Class

(Qt3DRender::QStateSet)

The QStateSet FrameGraph node offers a way of specifying a set of QRenderState objects to be applied during the execution of a framegraph branch. More...

Header: #include <QStateSet>
qmake: QT += 3drender
Since: Qt 5.5
Inherits: Qt3DRender::QFrameGraphNode

Public Functions

QStateSet(Qt3DCore::QNode *parent = Q_NULLPTR)
~QStateSet()
void addRenderState(QRenderState *state)
void removeRenderState(QRenderState *state)
QList<QRenderState *> renderStates() const

Protected Functions

QStateSet(QStateSetPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR)
void copy(const Qt3DCore::QNode *ref)

Additional Inherited Members

Detailed Description

The QStateSet FrameGraph node offers a way of specifying a set of QRenderState objects to be applied during the execution of a framegraph branch.

States set on a QStateSet are set globally, contrary to the per-material states that can be set on a QRenderPass. By default, an empty QStateSet will result in all render states being disabled when executed. Adding a QRenderState state explicitly enables that render state at runtime.

See also QRenderState and QRenderPass.

Member Function Documentation

QStateSet::QStateSet(Qt3DCore::QNode *parent = Q_NULLPTR)

Default constructs an instance of QStateSet.

[protected] QStateSet::QStateSet(QStateSetPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR)

Copy constructor.

QStateSet::~QStateSet()

Destroys the instance of QStateSet.

void QStateSet::addRenderState(QRenderState *state)

Adds a new QRenderState state to the QStateSet instance.

Note: Not setting any QRenderState state on a QStateSet instance implies all the render states will be disabled at render time.

[protected] void QStateSet::copy(const Qt3DCore::QNode *ref)

void QStateSet::removeRenderState(QRenderState *state)

Removes the QRenderState state from the QStateSet instance.

QList<QRenderState *> QStateSet::renderStates() const

Returns the list of QRenderState objects that compose the QStateSet instance.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/archives/qt-5.6/qt3drender-qstateset.html