summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2016-09-12 14:36:23 +0300
committerSean Harmer <sean.harmer@kdab.com>2016-11-14 14:20:09 +0000
commitf5281992cbab703488b9701898e44e55ee936e30 (patch)
tree27cecc8244e4634677cdf5b01292b0dedc368ac5
parent8cbca733dc27350cc193e4fefc645fbba67f41c0 (diff)
Update docs for render states part 2
Change-Id: I1ce94b0c6d25c709cb9e4f2e0a37ec6c68217ef9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/render/renderstates/qalphacoverage.cpp42
-rw-r--r--src/render/renderstates/qpolygonoffset.cpp77
-rw-r--r--src/render/renderstates/qrenderstate.cpp1
-rw-r--r--src/render/renderstates/qscissortest.cpp109
-rw-r--r--src/render/renderstates/qseamlesscubemap.cpp31
-rw-r--r--src/render/renderstates/qstencilmask.cpp80
-rw-r--r--src/render/renderstates/qstenciloperation.cpp68
-rw-r--r--src/render/renderstates/qstenciloperationarguments.cpp152
-rw-r--r--src/render/renderstates/qstenciltest.cpp63
-rw-r--r--src/render/renderstates/qstenciltestarguments.cpp134
10 files changed, 559 insertions, 198 deletions
diff --git a/src/render/renderstates/qalphacoverage.cpp b/src/render/renderstates/qalphacoverage.cpp
index 17251955d..428454040 100644
--- a/src/render/renderstates/qalphacoverage.cpp
+++ b/src/render/renderstates/qalphacoverage.cpp
@@ -46,13 +46,41 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QAlphaCoverage
- * \brief A QAlphaCoverage class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QAlphaCoverage
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+ \brief Enable alpha-to-coverage multisampling mode
+
+ A Qt3DRender::QAlphaCoverage class enables alpha-to-coverage multisampling mode.
+ When enabled, the fragment alpha value is used as a coverage for the sample
+ and combined with fragment coverage value. Qt3DRender::QAlphaCoverage does
+ nothing if multisampling is disabled. Alpha-to-coverage is most useful when
+ order independent blending is required, for example when rendering leaves,
+ grass and other rich vegetation.
+
+ \sa Qt3DRender::QMultiSampleAntiAliasing
+ */
+
+/*!
+ \qmltype AlphaCoverage
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QAlphaCoverage
+ \inherits RenderState
+ \brief Enable alpha-to-coverage multisampling mode
+
+ An AlphaCoverage type enables alpha-to-coverage multisampling mode.
+ When enabled, the fragment alpha value is used as a coverage for the sample
+ and combined with fragment coverage value. AlphaCoverage does nothing if
+ multisampling is disabled. Alpha-to-coverage is most useful when
+ order independent blending is required, for example when rendering leaves,
+ grass and other rich vegetation.
+
+ \sa MultiSampleAntiAliasing
*/
-/*! \internal */
class QAlphaCoveragePrivate : public QRenderStatePrivate
{
public :
@@ -64,8 +92,8 @@ public :
};
/*!
- * The constructor creates a new QAlphaCoverage::QAlphaCoverage instance
- * with the specified \a parent.
+ The constructor creates a new QAlphaCoverage::QAlphaCoverage instance
+ with the specified \a parent.
*/
QAlphaCoverage::QAlphaCoverage(QNode *parent)
: QRenderState(*new QAlphaCoveragePrivate, parent)
diff --git a/src/render/renderstates/qpolygonoffset.cpp b/src/render/renderstates/qpolygonoffset.cpp
index d9703ab4b..0d397f159 100644
--- a/src/render/renderstates/qpolygonoffset.cpp
+++ b/src/render/renderstates/qpolygonoffset.cpp
@@ -37,14 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QPolygonOffset
- * \brief The QPolygonOffset class sets the scale and steps to calculate depth
- * values for polygon offsets.
- * \since 5.7
- * \ingroup renderstates
- *
- */
#include "qpolygonoffset.h"
#include "qpolygonoffset_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -54,8 +46,58 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QPolygonOffset::QPolygonOffset instance
- * with the specified \a parent
+ \class Qt3DRender::QPolygonOffset
+ \brief The QPolygonOffset class sets the scale and steps to calculate depth
+ values for polygon offsets.
+ \since 5.7
+ \inmodule Qt3DRender
+ \ingroup renderstates
+
+ A QPolygonOffset class adds an offset to the fragment depth value prior to
+ depth test and depth write. The offset can be used to avoid z-fighting when
+ rendering polygons with very close depth values such as decals.
+ */
+
+/*!
+ \qmltype PolygonOffset
+ \brief The PolygonOffset type sets the scale and steps to calculate depth
+ values for polygon offsets.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \ingroup renderstates
+ \inherits RenderState
+ \instantiates Qt3DRender::QPolygonOffset
+
+ A PolygonOffset type adds an offset to the fragment depth value prior to
+ depth test and depth write. The offset can be used to avoid z-fighting when
+ rendering polygons with very close depth values such as decals.
+ */
+
+/*!
+ \qmlproperty real PolygonOffset::scaleFactor
+ Holds the scale factor used to create a variable depth offset for
+ each polygon. Default value is 0.
+*/
+
+/*!
+ \qmlproperty real PolygonOffset::depthSteps
+ Holds the units that create constant depth offsets. Default value is 0.
+*/
+
+/*!
+ \property QPolygonOffset::scaleFactor
+ Holds the scale factor used to create a variable depth offset for
+ each polygon. Default value is 0.
+*/
+
+/*!
+ \property QPolygonOffset::depthSteps
+ Holds the units that create constant depth offsets. Default value is 0.
+*/
+
+/*!
+ The constructor creates a new QPolygonOffset::QPolygonOffset instance
+ with the specified \a parent
*/
QPolygonOffset::QPolygonOffset(QNode *parent)
: QRenderState(*new QPolygonOffsetPrivate, parent)
@@ -67,20 +109,12 @@ QPolygonOffset::~QPolygonOffset()
{
}
-/*!
- * \return the current scale factor.
- */
float QPolygonOffset::scaleFactor() const
{
Q_D(const QPolygonOffset);
return d->m_scaleFactor;
}
-/*!
- * Sets the scale factor used to create a variable depth offset for
- * each polygon, to \a scaleFactor. Default value is 0.
- * \param scaleFactor
- */
void QPolygonOffset::setScaleFactor(float scaleFactor)
{
Q_D(QPolygonOffset);
@@ -90,19 +124,12 @@ void QPolygonOffset::setScaleFactor(float scaleFactor)
}
}
-/*!
- * \return the current depth steps.
- */
float QPolygonOffset::depthSteps() const
{
Q_D(const QPolygonOffset);
return d->m_depthSteps;
}
-/*!
- * Sets the units that create constant depth offsets, to depthSteps.
- * \param depthSteps
- */
void QPolygonOffset::setDepthSteps(float depthSteps)
{
Q_D(QPolygonOffset);
diff --git a/src/render/renderstates/qrenderstate.cpp b/src/render/renderstates/qrenderstate.cpp
index fcdfd0eba..e49292dbd 100644
--- a/src/render/renderstates/qrenderstate.cpp
+++ b/src/render/renderstates/qrenderstate.cpp
@@ -51,6 +51,7 @@ namespace Qt3DRender {
\brief An abstract base class for all render states
\since 5.7
\ingroup renderstates
+ \inmodule Qt3DRender
A Qt3DRender::QRenderState class is abstract base class for all render states.
One can not instantiate QRenderState directly, but through its subclasses.
diff --git a/src/render/renderstates/qscissortest.cpp b/src/render/renderstates/qscissortest.cpp
index e363ba54d..718978b7a 100644
--- a/src/render/renderstates/qscissortest.cpp
+++ b/src/render/renderstates/qscissortest.cpp
@@ -38,15 +38,6 @@
**
****************************************************************************/
-/*!
- * \class QScissorTest
- * \brief The QScissorTest class discards fragments that fall outside of a
- * certain rectangular portion of the screen.
- * \since 5.7
- * \ingroup renderstates
- *
- */
-
#include "qscissortest.h"
#include "qscissortest_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -56,8 +47,76 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QScissorTest::QScissorTest instance with the
- * specified \a parent
+ \class Qt3DRender::QScissorTest
+ \brief The QScissorTest class discards fragments that fall outside of a
+ certain rectangular portion of the screen.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A QScissorTest class enables scissor test, which discards fragments outside
+ the rectangular area of the screen specified by the left, bottom, width and
+ height properties.
+ */
+
+/*!
+ \qmltype ScissorTest
+ \brief The ScissorTest type discards fragments that fall outside of a
+ certain rectangular portion of the screen.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QScissorTest
+ \inherits RenderState
+
+ A ScissorTest type enables scissor test, which discards fragments outside
+ the rectangular area of the screen specified by the left, bottom, width and
+ height properties.
+ */
+
+/*!
+ \qmlproperty int ScissorTest::left
+ Holds the left coordinate of the scissor box.
+*/
+
+/*!
+ \qmlproperty int ScissorTest::bottom
+ Holds the bottom coordinate of the scissor box.
+*/
+
+/*!
+ \qmlproperty int ScissorTest::width
+ Holds the width of the scissor box.
+*/
+
+/*!
+ \qmlproperty int ScissorTest::height
+ Holds the height of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::left
+ Holds the left coordinate of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::bottom
+ Holds the bottom coordinate of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::width
+ Holds the width of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::height
+ Holds the height of the scissor box.
+*/
+
+/*!
+ The constructor creates a new QScissorTest::QScissorTest instance with the
+ specified \a parent
*/
QScissorTest::QScissorTest(QNode *parent)
: QRenderState(*new QScissorTestPrivate, parent)
@@ -69,19 +128,12 @@ QScissorTest::~QScissorTest()
{
}
-/*!
- * \return the left of the scissor box
- */
int QScissorTest::left() const
{
Q_D(const QScissorTest);
return d->m_left;
}
-/*!
- * Sets the left of the scissor box to \a setLeft
- * \param left
- */
void QScissorTest::setLeft(int left)
{
Q_D(QScissorTest);
@@ -91,19 +143,12 @@ void QScissorTest::setLeft(int left)
}
}
-/*!
- * \return the bottom of the scrissor box
- */
int QScissorTest::bottom() const
{
Q_D(const QScissorTest);
return d->m_bottom;
}
-/*!
- * Sets the bottom of the scissor box to \a bottom
- * \param bottom
- */
void QScissorTest::setBottom(int bottom)
{
Q_D(QScissorTest);
@@ -113,19 +158,12 @@ void QScissorTest::setBottom(int bottom)
}
}
-/*!
- * \return the width of the scissor box
- */
int QScissorTest::width() const
{
Q_D(const QScissorTest);
return d->m_width;
}
-/*!
- * Sets the width of the scissor box to \a width
- * \param width
- */
void QScissorTest::setWidth(int width)
{
Q_D(QScissorTest);
@@ -135,19 +173,12 @@ void QScissorTest::setWidth(int width)
}
}
-/*!
- * \return the height of the scissor box
- */
int QScissorTest::height() const
{
Q_D(const QScissorTest);
return d->m_height;
}
-/*!
- * Sets the height of the scissor box to \a height
- * \param height
- */
void QScissorTest::setHeight(int height)
{
Q_D(QScissorTest);
diff --git a/src/render/renderstates/qseamlesscubemap.cpp b/src/render/renderstates/qseamlesscubemap.cpp
index 6cf97743b..860b36450 100644
--- a/src/render/renderstates/qseamlesscubemap.cpp
+++ b/src/render/renderstates/qseamlesscubemap.cpp
@@ -47,15 +47,28 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QSeamlessCubemap
- * \brief Enables seamless cubemap texture filtering.
- * When present in a state set, enables the seamless cubemap texture filtering
- * as provided by the GL_ARB_seamless_cubemap extension (if available).
- * \since 5.7
- * \ingroup
+ \class Qt3DRender::QSeamlessCubemap
+ \brief Enables seamless cubemap texture filtering.
+ \since 5.7
+ \inmodule Qt3DRender
+
+ When present in a state set, enables the seamless cubemap texture filtering
+ as provided by the GL_ARB_seamless_cubemap extension (if available).
*/
-/*! \internal */
+/*!
+ \qmltype SeamlessCubemap
+ \brief Enables seamless cubemap texture filtering.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QSeamlessCubemap
+ \inherits RenderState
+
+ When present in a state set, enables the seamless cubemap texture filtering
+ as provided by the GL_ARB_seamless_cubemap extension (if available).
+ */
+
+
class QSeamlessCubemapPrivate : public QRenderStatePrivate
{
public:
@@ -68,8 +81,8 @@ public:
};
/*!
- * The constructor creates a new QSeamlessCubemap::QSeamlessCubemap instance
- * with the specified \a parent.
+ The constructor creates a new QSeamlessCubemap::QSeamlessCubemap instance
+ with the specified \a parent.
*/
QSeamlessCubemap::QSeamlessCubemap(QNode *parent)
: QRenderState(*new QSeamlessCubemapPrivate, parent)
diff --git a/src/render/renderstates/qstencilmask.cpp b/src/render/renderstates/qstencilmask.cpp
index 64cffbe8a..1b9b2cd10 100644
--- a/src/render/renderstates/qstencilmask.cpp
+++ b/src/render/renderstates/qstencilmask.cpp
@@ -37,15 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QStencilMask
- * \brief The QStencilMask class controls the front and back writing of
- * individual bits in the stencil planes.
- * \since 5.7
- * \ingroup renderstates
- *
- */
-
#include "qstencilmask.h"
#include "qstencilmask_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -55,8 +46,61 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QStencilMask::QStencilMask instance with the
- * specified \a parent.
+ \class Qt3DRender::QStencilMask
+ \brief The QStencilMask class controls the front and back writing of
+ individual bits in the stencil planes.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QStencilMask class specifies a write mask for the stencil values
+ after the stencil test. Mask can be specified separately for the front-facing
+ and back-facing polygons. The fragment stencil value is and'd with the mask
+ before it is written to the stencil buffer.
+
+ \sa Qt3DRender::QStencilTest
+ */
+
+/*!
+ \qmltype StencilMask
+ \brief The StencilMask type controls the front and back writing of
+ individual bits in the stencil planes.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QStencilMask
+ \inherits RenderState
+
+ A StencilMask type specifies the mask for the stencil test. Mask can be specified
+ separately for the front-facing and back-facing polygons. The stencil test reference
+ value and stencil buffer value gets and'd with the mask prior to applying stencil function.
+
+ \sa StencilTest
+ */
+
+/*!
+ \qmlproperty int StencilMask::frontOutputMask
+ Holds the write mask for the fragment stencil values for front-facing polygons.
+*/
+
+/*!
+ \qmlproperty int StencilMask::backOutputMask
+ Holds the write mask for the fragment stencil values for back-facing polygons.
+*/
+
+/*!
+ \property QStencilMask::frontOutputMask
+ Holds the write mask for the fragment stencil values for front-facing polygons.
+*/
+
+/*!
+ \property QStencilMask::backOutputMask
+ Holds the write mask for the fragment stencil values for back-facing polygons.
+*/
+
+/*!
+ The constructor creates a new QStencilMask::QStencilMask instance with the
+ specified \a parent.
*/
QStencilMask::QStencilMask(QNode *parent)
: QRenderState(*new QStencilMaskPrivate(), parent)
@@ -68,10 +112,6 @@ QStencilMask::~QStencilMask()
{
}
-/*!
- * Sets the front output mask to \a mask.
- * \param mask
- */
void QStencilMask::setFrontOutputMask(uint mask)
{
Q_D(QStencilMask);
@@ -81,10 +121,6 @@ void QStencilMask::setFrontOutputMask(uint mask)
}
}
-/*!
- * Sets the back output mask to \a mask.
- * \param mask
- */
void QStencilMask::setBackOutputMask(uint mask)
{
Q_D(QStencilMask);
@@ -94,18 +130,12 @@ void QStencilMask::setBackOutputMask(uint mask)
}
}
-/*!
- * \return the front output mask.
- */
uint QStencilMask::frontOutputMask() const
{
Q_D(const QStencilMask);
return d->m_frontOutputMask;
}
-/*!
- * \return the back output mask.
- */
uint QStencilMask::backOutputMask() const
{
Q_D(const QStencilMask);
diff --git a/src/render/renderstates/qstenciloperation.cpp b/src/render/renderstates/qstenciloperation.cpp
index 0b3842c53..7a5b113d8 100644
--- a/src/render/renderstates/qstenciloperation.cpp
+++ b/src/render/renderstates/qstenciloperation.cpp
@@ -37,14 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QStencilOperation
- * \brief The QStencilOperation class allows the selection of either the front
- * or back sides.
- * \since 5.7
- * \ingroup renderstates
- */
-
#include "qstenciloperation.h"
#include "qstenciloperation_p.h"
#include "qstenciloperationarguments.h"
@@ -55,8 +47,58 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QStencilOperation::QStencilOperation instance with
- * the specified \a parent.
+ \class Qt3DRender::QStencilOperation
+ \brief The QStencilOperation class specifies stencil operation
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QStencilOperation class specifies the stencil operations
+ for the front- and back-facing polygons. The stencil operation control
+ what is done to fragment when the stencil and depth test pass or fail.
+
+ \sa Qt3DRender::QStencilTest
+ */
+
+/*!
+ \qmltype StencilOperation
+ \brief The StencilOperation type specifies stencil operation
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QStencilOperation
+
+ A StencilOperation type specifies the stencil operations
+ for the front- and back-facing polygons. The stencil operation control
+ what is done to fragment when the stencil and depth test pass or fail.
+
+ \sa StencilTest
+ */
+
+/*!
+ \qmlproperty StencilOperationArguments StencilOperation::front
+ Holds the stencil operation arguments for front-facing polygons.
+*/
+
+/*!
+ \qmlproperty StencilOperationArguments StencilOperation::back
+ Holds the stencil operation arguments for back-facing polygons.
+*/
+
+/*!
+ \property QStencilOperation::front
+ Holds the stencil operation arguments for front-facing polygons.
+*/
+
+/*!
+ \property QStencilOperation::back
+ Holds the stencil operation arguments for back-facing polygons.
+*/
+
+/*!
+ The constructor creates a new QStencilOperation::QStencilOperation instance with
+ the specified \a parent.
*/
QStencilOperation::QStencilOperation(QNode *parent)
: QRenderState(*new QStencilOperationPrivate(), parent)
@@ -68,18 +110,12 @@ QStencilOperation::~QStencilOperation()
{
}
-/*!
- * \return the front fragments.
- */
QStencilOperationArguments *QStencilOperation::front() const
{
Q_D(const QStencilOperation);
return d->m_front;
}
-/*!
- * \return the back fragments.
- */
QStencilOperationArguments *QStencilOperation::back() const
{
Q_D(const QStencilOperation);
diff --git a/src/render/renderstates/qstenciloperationarguments.cpp b/src/render/renderstates/qstenciloperationarguments.cpp
index a7b1192be..f5d0c1f4f 100644
--- a/src/render/renderstates/qstenciloperationarguments.cpp
+++ b/src/render/renderstates/qstenciloperationarguments.cpp
@@ -37,15 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QStencilOperationArguments
- * \brief The QStencilOperationArguments class sets the actions to be taken
- * when stencil and depth tests fail.
- * \since 5.7
- * \ingroup renderstates
- *
- */
-
#include "qstenciloperationarguments.h"
#include "qstenciloperationarguments_p.h"
@@ -54,8 +45,123 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QStencilOperationArguments::QStencilOperationArguments
- * instance with the specified \a mode and \a parent.
+ \class Qt3DRender::QStencilOperationArguments
+ \brief The QStencilOperationArguments class sets the actions to be taken
+ when stencil and depth tests fail.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ The Qt3DRender::QStencilOperationArguments class specifies the arguments for
+ the stencil operations.
+
+ \sa Qt3DRender::QStencilOperation
+ */
+
+/*!
+ \qmltype StencilOperationArguments
+ \brief The StencilOperationArguments type sets the actions to be taken
+ when stencil and depth tests fail.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QStencilOperationArguments
+ \inherits QtObject
+
+ The StencilOperationArguments type specifies the arguments for the stencil operations.
+
+ \sa StencilOperation
+ */
+
+/*!
+ \enum Qt3DRender::QStencilOperationArguments::FaceMode
+ This enumeration holds the values for stencil operation argument face modes
+ \value Front Arguments are applied to front-facing polygons.
+ \value Back Arguments are applied to back-facing polygons.
+ \value FrontAndBack Arguments are applied to both front- and back-facing polygons.
+*/
+
+/*!
+ \enum Qt3DRender::QStencilOperationArguments::Operation
+ This enumeration holds the values for stencil operation.
+ \value Zero Set stencil value to zero.
+ \value Keep Keep current stencil value.
+ \value Replace Replace with the masked fragment stencil value.
+ \value Increment Increment current value with saturation.
+ \value Decrement Decrement current value with saturation.
+ \value IncrementWrap Increment current value with wrap.
+ \value DecrementWrap Decrement current value with wrap.
+ \value Invert Invert the current value.
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \list
+ \li StencilOperationArguments.Front
+ \li StencilOperationArguments.Back
+ \li StencilOperationArguments.FrontAndBack
+ \endlist
+ \sa Qt3DRender::QStencilOperationArguments::FaceMode
+ \readonly
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::stencilTestFailureOperation
+ Holds the stencil test operation for when the stencil test fails.
+ Default is StencilOperationArguments.Keep.
+ \list
+ \li StencilOperationArguments.Zero
+ \li StencilOperationArguments.Keep
+ \li StencilOperationArguments.Replace
+ \li StencilOperationArguments.Increment
+ \li StencilOperationArguments.Decrement
+ \li StencilOperationArguments.IncrementWrap
+ \li StencilOperationArguments.DecrementWrap
+ \li StencilOperationArguments.Inverter
+ \endlist
+ \sa Qt3DRender::QStencilOperationArguments::Operation
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::depthTestFailureOperation
+ Holds the stencil test operation for when the stencil test passes, but
+ depth test fails. Default is StencilOperationArguments.Keep.
+ \sa StencilOperationArguments::stencilTestFailureOperation, Qt3DRender::QStencilOperationArguments::Operation
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::allTestsPassOperation
+ Holds the stencil test operation for when depth and stencil test pass. Default is StencilOperationArguments.Keep.
+ \sa StencilOperationArguments::stencilTestFailureOperation, Qt3DRender::QStencilOperationArguments::Operation
+*/
+
+/*!
+ \property QStencilOperationArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \readonly
+*/
+
+/*!
+ \property QStencilOperationArguments::stencilTestFailureOperation
+ Holds the stencil test operation for when the stencil test fails.
+ Default is StencilOperationArguments.Keep.
+*/
+
+/*!
+ \property QStencilOperationArguments::depthTestFailureOperation
+ Holds the stencil test operation for when the stencil test passes, but
+ depth test fails. Default is StencilOperationArguments.Keep.
+*/
+
+/*!
+ \property QStencilOperationArguments::allTestsPassOperation
+ Holds the stencil test operation for when depth and stencil test pass. Default is StencilOperationArguments.Keep.
+*/
+
+/*!
+ The constructor creates a new QStencilOperationArguments::QStencilOperationArguments
+ instance with the specified \a mode and \a parent.
*/
QStencilOperationArguments::QStencilOperationArguments(FaceMode mode, QObject *parent)
: QObject(*new QStencilOperationArgumentsPrivate(mode), parent)
@@ -67,19 +173,12 @@ QStencilOperationArguments::~QStencilOperationArguments()
{
}
-/*!
- * \return the current face mode.
- */
QStencilOperationArguments::FaceMode QStencilOperationArguments::faceMode() const
{
Q_D(const QStencilOperationArguments);
return d->m_face;
}
-/*!
- * Sets the stencil action when a test fails, to operation.
- * \param operation
- */
void QStencilOperationArguments::setStencilTestFailureOperation(QStencilOperationArguments::Operation operation)
{
Q_D(QStencilOperationArguments);
@@ -89,19 +188,12 @@ void QStencilOperationArguments::setStencilTestFailureOperation(QStencilOperatio
}
}
-/*!
- * \return the current stencil test failure operation.
- */
QStencilOperationArguments::Operation QStencilOperationArguments::stencilTestFailureOperation() const
{
Q_D(const QStencilOperationArguments);
return d->m_stencilTestFailureOperation;
}
-/*!
- * Sets the action when the depth test fails, to operation.
- * \param operation
- */
void QStencilOperationArguments::setDepthTestFailureOperation(QStencilOperationArguments::Operation operation)
{
Q_D(QStencilOperationArguments);
@@ -111,19 +203,12 @@ void QStencilOperationArguments::setDepthTestFailureOperation(QStencilOperationA
}
}
-/*!
- * \return the current depth test failure operation.
- */
QStencilOperationArguments::Operation QStencilOperationArguments::depthTestFailureOperation() const
{
Q_D(const QStencilOperationArguments);
return d->m_depthTestFailureOperation;
}
-/*!
- * Sets the action when both the depth and stencil tests fail, to operation.
- * \param operation
- */
void QStencilOperationArguments::setAllTestsPassOperation(QStencilOperationArguments::Operation operation)
{
Q_D(QStencilOperationArguments);
@@ -133,9 +218,6 @@ void QStencilOperationArguments::setAllTestsPassOperation(QStencilOperationArgum
}
}
-/*!
- * \return the current failure operation for when both tests fail.
- */
QStencilOperationArguments::Operation QStencilOperationArguments::allTestsPassOperation() const
{
Q_D(const QStencilOperationArguments);
diff --git a/src/render/renderstates/qstenciltest.cpp b/src/render/renderstates/qstenciltest.cpp
index 2341a3b7d..f1e42f1e3 100644
--- a/src/render/renderstates/qstenciltest.cpp
+++ b/src/render/renderstates/qstenciltest.cpp
@@ -48,15 +48,60 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QStencilTest
- * \brief The QStencilTest class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QStencilTest
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+ \brief The QStencilTest class specifies arguments for the stecil test
+
+ A Qt3DRender::QStencilTest class specifies argument for the stencil test.
+ The stencil test comprises of three arguments: stencil test function,
+ stencil test mask and stencil reference value. QStencilTest allows these
+ arguments to be set for both front- and back-facing polygons separately.
+
+ \sa Qt3DRender::QStencilMask, Qt3DRender::QStencilOperation
*/
/*!
- * The constructor creates a new QStencilTest::QStencilTest instance with
- * the specified \a parent.
+ \qmltype StencilTest
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \brief The StencilTest type specifies arguments for the stecil test
+ \inherits RenderState
+ \instantiates Qt3DRender::QStencilTest
+
+ A StencilTest type specifies argument for the stencil test.
+ The stencil test comprises of three arguments: stencil test function,
+ stencil test mask and stencil reference value. StencilTest allows these
+ arguments to be set for both front- and back-facing polygons separately.
+
+ \sa StencilMask, StencilOperation
+ */
+
+/*!
+ \qmlproperty StencilTestArguments StencilTest::front
+ Holds the stencil test arguments for front-facing polygons.
+*/
+
+/*!
+ \qmlproperty StencilTestArguments StencilTest::back
+ Holds the stencil test arguments for back-facing polygons.
+*/
+
+/*!
+ \property QStencilTest::front
+ Holds the stencil test arguments for front-facing polygons.
+*/
+
+/*!
+ \property QStencilTest::back
+ Holds the stencil test arguments for back-facing polygons.
+*/
+
+/*!
+ The constructor creates a new QStencilTest::QStencilTest instance with
+ the specified \a parent.
*/
QStencilTest::QStencilTest(QNode *parent)
: QRenderState(*new QStencilTestPrivate, parent)
@@ -68,18 +113,12 @@ QStencilTest::~QStencilTest()
{
}
-/*!
- * \return the stencil test for the front
- */
QStencilTestArguments *QStencilTest::front() const
{
Q_D(const QStencilTest);
return d->m_front;
}
-/*!
- * \return the stencil test for the back
- */
QStencilTestArguments *QStencilTest::back() const
{
Q_D(const QStencilTest);
diff --git a/src/render/renderstates/qstenciltestarguments.cpp b/src/render/renderstates/qstenciltestarguments.cpp
index 1e618e372..ae1fd1111 100644
--- a/src/render/renderstates/qstenciltestarguments.cpp
+++ b/src/render/renderstates/qstenciltestarguments.cpp
@@ -45,15 +45,113 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class QStencilTestArguments
- * \brief The QStencilTestArguments class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QStencilTestArguments
+ \brief The QStencilTestArguments class specifies arguments for stencil test
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ The Qt3DRender::QStencilTestArguments class specifies the arguments for
+ the stencil test.
+ */
+
+/*!
+ \qmltype StencilTestArguments
+ \brief The StencilTestArguments type specifies arguments for stencil test
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QStencilTestArguments
+ \inherits QtObject
+
+ The StencilTestArguments type specifies the arguments for
+ the stencil test.
*/
/*!
- * The constructor creates a new QStencilTestArguments::QStencilTestArguments
- * instance with the specified \a face and \a parent.
+ \enum Qt3DRender::QStencilTestArguments::StencilFaceMode
+ This enumeration holds the values for stencil test arguments face modes
+ \value Front Arguments are applied to front-facing polygons.
+ \value Back Arguments are applied to back-facing polygons.
+ \value FrontAndBack Arguments are applied to both front- and back-facing polygons.
+*/
+
+/*!
+ \enum Qt3DRender::QStencilTestArguments::StencilFunction
+
+ Enumeration for the stencil function values
+ \value Never Never pass stencil test
+ \value Always Always pass stencil test
+ \value Less Pass stencil test if fragment stencil is less than reference value
+ \value LessOrEqual Pass stencil test if fragment stencil is less than or equal to reference value
+ \value Equal Pass stencil test if fragment stencil is equal to reference value
+ \value GreaterOrEqual Pass stencil test if fragment stencil is greater than or equal to reference value
+ \value Greater Pass stencil test if fragment stencil is greater than reference value
+ \value NotEqual Pass stencil test if fragment stencil is not equal to reference value
+*/
+
+/*!
+ \qmlproperty enumeration StencilTestArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \list
+ \li StencilTestArguments.Front
+ \li StencilTestArguments.Back
+ \li StencilTestArguments.FrontAndBack
+ \endlist
+ \sa Qt3DRender::QStencilTestArguments::StencilFaceMode
+ \readonly
+*/
+
+/*!
+ \qmlproperty int StencilTestArguments::comparisonMask
+ Holds the stencil test comparison mask. Default is all zeroes.
+*/
+
+/*!
+ \qmlproperty int StencilTestArguments::referenceValue
+ Holds the stencil test reference value. Default is zero.
+*/
+
+/*!
+ \qmlproperty enumeration StencilTestArguments::stencilFunction
+ Holds the stencil test function. Default is StencilTestArguments.Never.
+ \list
+ \li StencilTestArguments.Never
+ \li StencilTestArguments.Always
+ \li StencilTestArguments.Less
+ \li StencilTestArguments.LessOrEqual
+ \li StencilTestArguments.Equal
+ \li StencilTestArguments.GreaterOrEqual
+ \li StencilTestArguments.Greater
+ \li StencilTestArguments.NotEqual
+ \endlist
+*/
+
+/*!
+ \property QStencilTestArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \readonly
+*/
+
+/*!
+ \property QStencilTestArguments::comparisonMask
+ Holds the stencil test comparison mask. Default is all zeroes.
+*/
+
+/*!
+ \property QStencilTestArguments::referenceValue
+ Holds the stencil test reference value. Default is zero.
+*/
+
+/*!
+ \property QStencilTestArguments::stencilFunction
+ Holds the stencil test function. Default is Never.
+ \sa Qt3DRender::QStencilTestArguments::StencilFunction
+*/
+
+/*!
+ The constructor creates a new QStencilTestArguments::QStencilTestArguments
+ instance with the specified \a face and \a parent.
*/
QStencilTestArguments::QStencilTestArguments(QStencilTestArguments::StencilFaceMode face, QObject *parent)
: QObject(*new QStencilTestArgumentsPrivate(face), parent)
@@ -65,19 +163,12 @@ QStencilTestArguments::~QStencilTestArguments()
{
}
-/*!
- * \return the current comparison mask.
- */
uint QStencilTestArguments::comparisonMask() const
{
Q_D(const QStencilTestArguments);
return d->m_comparisonMask;
}
-/*!
- * Sets the comparison mask.
- * \param comparisonMask
- */
void QStencilTestArguments::setComparisonMask(uint comparisonMask)
{
Q_D(QStencilTestArguments);
@@ -87,19 +178,12 @@ void QStencilTestArguments::setComparisonMask(uint comparisonMask)
}
}
-/*!
- * \return the current reference value.
- */
int QStencilTestArguments::referenceValue() const
{
Q_D(const QStencilTestArguments);
return d->m_referenceValue;
}
-/*!
- * Sets the reference value.
- * \param referenceValue
- */
void QStencilTestArguments::setReferenceValue(int referenceValue)
{
Q_D(QStencilTestArguments);
@@ -109,19 +193,12 @@ void QStencilTestArguments::setReferenceValue(int referenceValue)
}
}
-/*!
- * \return the current stencil function.
- */
QStencilTestArguments::StencilFunction QStencilTestArguments::stencilFunction() const
{
Q_D(const QStencilTestArguments);
return d->m_stencilFunction;
}
-/*!
- * Sets the stencil function.
- * \param stencilFunction
- */
void QStencilTestArguments::setStencilFunction(QStencilTestArguments::StencilFunction stencilFunction)
{
Q_D(QStencilTestArguments);
@@ -131,9 +208,6 @@ void QStencilTestArguments::setStencilFunction(QStencilTestArguments::StencilFun
}
}
-/*!
- * \return the current face mode.
- */
QStencilTestArguments::StencilFaceMode QStencilTestArguments::faceMode() const
{
Q_D(const QStencilTestArguments);