QRenderStateSet Class | Qt 3D 5.9

Qt 5.9 | Qt 3D | C++ Classes | QRenderStateSet

Qt 5.9.9 Reference Documentation

# QRenderStateSet Class

(Qt3DRender::QRenderStateSet)

The QRenderStateSet 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 <QRenderStateSet>
qmake: | QT += 3drender
Since: | Qt 5.5
Instantiated By: | RenderStateSet
Inherits: | Qt3DRender::QFrameGraphNode

- List of all members, including inherited members

## Public Functions

| QRenderStateSet(Qt3DCore::QNode *parent = nullptr)
void | addRenderState(QRenderState *state)
void | removeRenderState(QRenderState *state)
QVector<QRenderState *> | renderStates() const

- 1 public function inherited from Qt3DRender::QFrameGraphNode
- 11 public functions inherited from Qt3DCore::QNode

## Protected Functions

| QRenderStateSet(QRenderStateSetPrivate &dd, Qt3DCore::QNode *parent = nullptr)

- 1 protected function inherited from Qt3DRender::QFrameGraphNode
- 2 protected functions inherited from Qt3DCore::QNode

### Additional Inherited Members

- 3 properties inherited from Qt3DCore::QNode
- 3 public slots inherited from Qt3DCore::QNode
- 4 signals inherited from Qt3DCore::QNode

## Detailed Description

The QRenderStateSet 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 QRenderStateSet are set globally, contrary to the per-material states that can be set on a QRenderPass. By default, an empty QRenderStateSet 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

### QRenderStateSet::QRenderStateSet(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QRenderStateSet.

### `[protected]` QRenderStateSet::QRenderStateSet(QRenderStateSetPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

### void QRenderStateSet::addRenderState(QRenderState *state)

Adds a new QRenderState state to the QRenderStateSet instance.

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

### void QRenderStateSet::removeRenderState(QRenderState *state)

Removes the QRenderState state from the QRenderStateSet instance.

### QVector<QRenderState *> QRenderStateSet::renderStates() const

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