diff options
author | Robert Brock <robert.brock@kdab.com> | 2016-05-19 17:03:45 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-05-26 05:49:11 +0000 |
commit | 15c8cb981b8e065de797263d2d442f5817f79369 (patch) | |
tree | a42ce584d5439a197869d74b8cc009312c284c65 /src | |
parent | e7171fea8981c695274746449d98f1243e1f6a0b (diff) |
Adding QDoc to QAlphaTest
Adding documentation to aid in the explanation
of how to use QAlphaTest and its general
relation to OpenGL.
Change-Id: I00c0265f07b063d8bb57ad1c90337940b1425677
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/render/renderstates/qalphatest.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/render/renderstates/qalphatest.cpp b/src/render/renderstates/qalphatest.cpp index 9f60ceac6..2341c1039 100644 --- a/src/render/renderstates/qalphatest.cpp +++ b/src/render/renderstates/qalphatest.cpp @@ -38,6 +38,17 @@ ** ****************************************************************************/ +/*! + * \class QAlphaTest + * \brief The QAlphaTest class is an OpenGL helper. + * \since 5.7 + * \ingroup renderstates + * + * As the OpenGL documentation explains; The alpha test discards a fragment + * conditional on the outcome of a comparison between the incoming fragment's + * alpha value and a constant value. + */ + #include "qalphatest.h" #include "qalphatest_p.h" #include <Qt3DRender/private/qrenderstatecreatedchange_p.h> @@ -56,12 +67,19 @@ QAlphaTest::~QAlphaTest() { } +/*! + * \return the current alpha test function. + */ QAlphaTest::AlphaFunction QAlphaTest::alphaFunction() const { Q_D(const QAlphaTest); return d->m_alphaFunction; } +/*! + * Sets the alpha test function to \a alphaFunction. + * \param alphaFunction + */ void QAlphaTest::setAlphaFunction(QAlphaTest::AlphaFunction alphaFunction) { Q_D(QAlphaTest); @@ -71,12 +89,18 @@ void QAlphaTest::setAlphaFunction(QAlphaTest::AlphaFunction alphaFunction) } } +/*! + * \return a float value between 0 and 1. + */ float QAlphaTest::referenceValue() const { Q_D(const QAlphaTest); return d->m_referenceValue; } +/*! + * Sets the reference value which is clamped between 0 and 1 to \a referenceValue. + */ void QAlphaTest::setReferenceValue(float referenceValue) { Q_D(QAlphaTest); |