summaryrefslogtreecommitdiffstats
path: root/src/render/frontend/qrenderpass.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-03-31 09:08:37 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-05-10 12:25:27 +0000
commitb43e70b9dde614a91d6c9f993c3b444cd113e4e2 (patch)
treeacc96d87b6739ba8effae57fc605a8b35f73eb8b /src/render/frontend/qrenderpass.cpp
parentbc36e7d6549ab9209e87a5edaa8d6643e1d8f36a (diff)
Fix: Allow StateSet to not contain any Qt3D::QRenderState
This offers a way to explicitly request every render states to be disabled. Also updated the doc to be clear about how render states are defined. Change-Id: I91af58dd3ede7ffd7fc9cc022c5e007104791151 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/frontend/qrenderpass.cpp')
-rw-r--r--src/render/frontend/qrenderpass.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/render/frontend/qrenderpass.cpp b/src/render/frontend/qrenderpass.cpp
index 3c58b87b1..2aa9683a0 100644
--- a/src/render/frontend/qrenderpass.cpp
+++ b/src/render/frontend/qrenderpass.cpp
@@ -213,6 +213,14 @@ QList<QParameterMapping *> QRenderPass::bindings() const
return d->m_bindings;
}
+/*!
+ * Adds a Qt3D::QRenderState \a 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 Qt3D::QRenderPass.
+ *
+ * \note not defining any Qt3D::QRenderState in a pass will result in the pass using
+ * the globally set render state for a given FrameGraph branch execution path.
+ */
void QRenderPass::addRenderState(QRenderState *state)
{
Q_D(QRenderPass);
@@ -232,6 +240,9 @@ void QRenderPass::addRenderState(QRenderState *state)
}
}
+/*!
+ * Removes \a state from the Qt3D::QRenderPass local render state.
+ */
void QRenderPass::removeRenderState(QRenderState *state)
{
Q_D(QRenderPass);
@@ -244,6 +255,10 @@ void QRenderPass::removeRenderState(QRenderState *state)
d->m_renderStates.removeOne(state);
}
+/*!
+ * Returns the list of Qt3D::QRenderState state objects making up the render
+ * state of the Qt3D::QRenderPass.
+ */
QList<QRenderState *> QRenderPass::renderStates() const
{
Q_D(const QRenderPass);