diff options
author | Robert Brock <robert.brock@kdab.com> | 2016-02-25 15:10:58 +0000 |
---|---|---|
committer | Robert Brock <robert.brock@kdab.com> | 2016-02-26 10:41:38 +0000 |
commit | 50e51c827b6cf22e8387631833add6af01d51843 (patch) | |
tree | 2440a7ef659446d7287ef44df71415a1dc3a31b7 /src/render | |
parent | 7e2f9d42eebe13182918d832577c4f5ed96ab87b (diff) |
QDepthTest rename func to depthFunction
As per API review
Change-Id: Iea3cbdb16618b248e221817000b71822a588bf6a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/defaults/qnormaldiffusemapalphamaterial.cpp | 2 | ||||
-rw-r--r-- | src/render/defaults/qskyboxentity.cpp | 2 | ||||
-rw-r--r-- | src/render/renderstates/qdepthtest.cpp | 18 | ||||
-rw-r--r-- | src/render/renderstates/qdepthtest.h | 12 | ||||
-rw-r--r-- | src/render/renderstates/renderstateset.cpp | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/render/defaults/qnormaldiffusemapalphamaterial.cpp b/src/render/defaults/qnormaldiffusemapalphamaterial.cpp index 075c55d5d..601b5dce9 100644 --- a/src/render/defaults/qnormaldiffusemapalphamaterial.cpp +++ b/src/render/defaults/qnormaldiffusemapalphamaterial.cpp @@ -97,7 +97,7 @@ void QNormalDiffuseMapAlphaMaterialPrivate::init() m_normalDiffuseGL2Technique->addAnnotation(m_annotation); m_normalDiffuseES2Technique->addAnnotation(m_annotation); - m_depthTest->setFunc(QDepthTest::Less); + m_depthTest->setDepthFunction(QDepthTest::Less); m_normalDiffuseGL3RenderPass->setShaderProgram(m_normalDiffuseGL3Shader); m_normalDiffuseGL3RenderPass->addRenderState(m_alphaCoverage); diff --git a/src/render/defaults/qskyboxentity.cpp b/src/render/defaults/qskyboxentity.cpp index e14651787..150a28096 100644 --- a/src/render/defaults/qskyboxentity.cpp +++ b/src/render/defaults/qskyboxentity.cpp @@ -127,7 +127,7 @@ void QSkyboxEntityPrivate::init() QCullFace *cullFront = new QCullFace(); cullFront->setMode(QCullFace::Front); QDepthTest *depthTest = new QDepthTest(); - depthTest->setFunc(QDepthTest::LessOrEqual); + depthTest->setDepthFunction(QDepthTest::LessOrEqual); m_gl3RenderPass->addRenderState(cullFront); m_gl3RenderPass->addRenderState(depthTest); diff --git a/src/render/renderstates/qdepthtest.cpp b/src/render/renderstates/qdepthtest.cpp index 52178c02a..283c751c2 100644 --- a/src/render/renderstates/qdepthtest.cpp +++ b/src/render/renderstates/qdepthtest.cpp @@ -54,19 +54,19 @@ class QDepthTestPrivate : public QRenderStatePrivate public : QDepthTestPrivate() : QRenderStatePrivate(QRenderState::DepthTest) - , m_func(QDepthTest::Never) + , m_depthFunction(QDepthTest::Never) { } Q_DECLARE_PUBLIC(QDepthTest) - QDepthTest::DepthFunc m_func; + QDepthTest::DepthFunction m_depthFunction; }; void QDepthTest::copy(const QNode *ref) { QRenderState::copy(ref); const QDepthTest *refState = static_cast<const QDepthTest*>(ref); - d_func()->m_func = refState->d_func()->m_func; + d_func()->m_depthFunction = refState->d_func()->m_depthFunction; } QDepthTest::QDepthTest(QNode *parent) @@ -79,18 +79,18 @@ QDepthTest::~QDepthTest() QNode::cleanup(); } -QDepthTest::DepthFunc QDepthTest::func() const +QDepthTest::DepthFunction QDepthTest::depthFunction() const { Q_D(const QDepthTest); - return d->m_func; + return d->m_depthFunction; } -void QDepthTest::setFunc(QDepthTest::DepthFunc func) +void QDepthTest::setDepthFunction(QDepthTest::DepthFunction depthFunction) { Q_D(QDepthTest); - if (d->m_func != func) { - d->m_func = func; - emit funcChanged(func); + if (d->m_depthFunction != depthFunction) { + d->m_depthFunction = depthFunction; + emit depthFunctionChanged(depthFunction); } } diff --git a/src/render/renderstates/qdepthtest.h b/src/render/renderstates/qdepthtest.h index 770955d34..4a7b25f33 100644 --- a/src/render/renderstates/qdepthtest.h +++ b/src/render/renderstates/qdepthtest.h @@ -52,10 +52,10 @@ class QDepthTestPrivate; class QT3DRENDERSHARED_EXPORT QDepthTest : public QRenderState { Q_OBJECT - Q_PROPERTY(DepthFunc func READ func WRITE setFunc NOTIFY funcChanged) + Q_PROPERTY(DepthFunction depthFunction READ depthFunction WRITE setDepthFunction NOTIFY depthFunctionChanged) public: - enum DepthFunc { + enum DepthFunction { Never = 0x0200, Always = 0x0207, Less = 0x0201, @@ -65,18 +65,18 @@ public: Greater = 0x0204, NotEqual = 0x0205 }; - Q_ENUM(DepthFunc) + Q_ENUM(DepthFunction) explicit QDepthTest(Qt3DCore::QNode *parent = 0); ~QDepthTest(); - DepthFunc func() const; + DepthFunction depthFunction() const; public Q_SLOTS: - void setFunc(DepthFunc func); + void setDepthFunction(DepthFunction depthFunction); Q_SIGNALS: - void funcChanged(DepthFunc func); + void depthFunctionChanged(DepthFunction depthFunction); protected: void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE; diff --git a/src/render/renderstates/renderstateset.cpp b/src/render/renderstates/renderstateset.cpp index 62ba98c7e..a4b6a11e8 100644 --- a/src/render/renderstates/renderstateset.cpp +++ b/src/render/renderstates/renderstateset.cpp @@ -293,7 +293,7 @@ RenderStateImpl* RenderStateImpl::getOrCreateState(QRenderState *renderState) } case QRenderState::DepthTest: { QDepthTest *depthTest = static_cast<QDepthTest *>(renderState); - return getOrCreateRenderStateImpl<DepthTest>(depthTest->func()); + return getOrCreateRenderStateImpl<DepthTest>(depthTest->depthFunction()); } case QRenderState::AlphaCoverage: case QRenderState::Dithering: |