diff options
18 files changed, 39 insertions, 39 deletions
diff --git a/examples/qt3d/anaglyph-rendering/StereoFrameGraph.qml b/examples/qt3d/anaglyph-rendering/StereoFrameGraph.qml index 3df92f33d..09bf2ce26 100644 --- a/examples/qt3d/anaglyph-rendering/StereoFrameGraph.qml +++ b/examples/qt3d/anaglyph-rendering/StereoFrameGraph.qml @@ -73,7 +73,7 @@ Viewport { StateSet { renderStates: [ ColorMask { red: true; green: false; blue: false; alpha: false }, - DepthTest { func: DepthTest.Less } + DepthTest { depthFunction: DepthTest.Less } ] } } @@ -86,7 +86,7 @@ Viewport { StateSet { renderStates: [ ColorMask { red: false; green: true; blue: true; alpha: false }, - DepthTest { func: DepthTest.Less } + DepthTest { depthFunction: DepthTest.Less } ] } } diff --git a/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml b/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml index dde9e50d3..e2264588c 100644 --- a/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml +++ b/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml @@ -67,7 +67,7 @@ Viewport { ClipPlane { plane: 0 }, ClipPlane { plane: 1 }, ClipPlane { plane: 2 }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] // Branch 1 diff --git a/examples/qt3d/planets-qml/PlanetShadowEffectD.qml b/examples/qt3d/planets-qml/PlanetShadowEffectD.qml index 64969553b..578080472 100644 --- a/examples/qt3d/planets-qml/PlanetShadowEffectD.qml +++ b/examples/qt3d/planets-qml/PlanetShadowEffectD.qml @@ -87,7 +87,7 @@ Effect { renderStates: [ PolygonOffset { factor: 4; units: 4 }, - DepthTest { func: DepthTest.Less } + DepthTest { depthFunction: DepthTest.Less } ] }, RenderPass { diff --git a/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml b/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml index 2e4333bb3..68375d092 100644 --- a/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml +++ b/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml @@ -181,7 +181,7 @@ Material { renderStates : [BlendState {srcRGB: BlendState.One; dstRGB : BlendState.One}, BlendEquation {mode: BlendEquation.FuncAdd}, CullFace { mode : CullFace.Back }, - DepthTest { func : DepthTest.LessOrEqual} + DepthTest { depthFunction : DepthTest.LessOrEqual} ] shaderProgram : ShaderProgram { vertexShaderCode: " diff --git a/examples/qt3d/playground-qml/ComplexTechnique.qml b/examples/qt3d/playground-qml/ComplexTechnique.qml index 5ef66d9a7..3e1e48479 100644 --- a/examples/qt3d/playground-qml/ComplexTechnique.qml +++ b/examples/qt3d/playground-qml/ComplexTechnique.qml @@ -156,7 +156,7 @@ Technique { renderStates : [BlendState {srcRGB: BlendState.One; dstRGB : BlendState.One}, BlendEquation {mode: BlendEquation.FuncAdd}, CullFace { mode : CullFace.Back }, - DepthTest { func : DepthTest.LessOrEqual} + DepthTest { depthFunction : DepthTest.LessOrEqual} ] shaderProgram : ShaderProgram { vertexShaderCode: " diff --git a/examples/qt3d/shadow-map-qml/AdsEffect.qml b/examples/qt3d/shadow-map-qml/AdsEffect.qml index a3836f429..e136d91fe 100644 --- a/examples/qt3d/shadow-map-qml/AdsEffect.qml +++ b/examples/qt3d/shadow-map-qml/AdsEffect.qml @@ -93,7 +93,7 @@ Effect { renderStates: [ PolygonOffset { factor: 4; units: 4 }, - DepthTest { func: DepthTest.Less } + DepthTest { depthFunction: DepthTest.Less } ] }, @@ -138,7 +138,7 @@ Effect { renderStates: [ PolygonOffset { factor: 4; units: 4 }, - DepthTest { func: DepthTest.Less } + DepthTest { depthFunction: DepthTest.Less } ] }, diff --git a/examples/qt3d/skybox/Skybox.qml b/examples/qt3d/skybox/Skybox.qml index 12c7915f1..05725c49f 100644 --- a/examples/qt3d/skybox/Skybox.qml +++ b/examples/qt3d/skybox/Skybox.qml @@ -115,7 +115,7 @@ Entity { renderStates: [ // cull front faces CullFace { mode: CullFace.Front }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] } }, @@ -130,7 +130,7 @@ Entity { shaderProgram: gl2es2SkyboxShader renderStates: [ CullFace { mode: CullFace.Front }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] } }, @@ -145,7 +145,7 @@ Entity { shaderProgram: gl2es2SkyboxShader renderStates: [ CullFace { mode: CullFace.Front }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] } } diff --git a/examples/qt3d/transparency-qml-scene3d/Scene.qml b/examples/qt3d/transparency-qml-scene3d/Scene.qml index 1989151e1..a2d24129a 100644 --- a/examples/qt3d/transparency-qml-scene3d/Scene.qml +++ b/examples/qt3d/transparency-qml-scene3d/Scene.qml @@ -154,7 +154,7 @@ Entity { renderPasses: RenderPass { renderStates: [ CullFace { mode : CullFace.Back }, - DepthTest { func: DepthTest.Less }, + DepthTest { depthFunction: DepthTest.Less }, DepthMask { mask: false }, BlendState { srcRGB: BlendState.SrcAlpha @@ -178,7 +178,7 @@ Entity { renderPasses: RenderPass { renderStates: [ CullFace { mode : CullFace.Back }, - DepthTest { func: DepthTest.Less }, + DepthTest { depthFunction: DepthTest.Less }, DepthMask { mask: false }, BlendState { srcRGB: BlendState.SrcAlpha diff --git a/examples/qt3d/transparency-qml/main.qml b/examples/qt3d/transparency-qml/main.qml index f2369d62f..c11b887d8 100644 --- a/examples/qt3d/transparency-qml/main.qml +++ b/examples/qt3d/transparency-qml/main.qml @@ -172,7 +172,7 @@ Entity { renderPasses: RenderPass { renderStates: [ CullFace { mode : CullFace.Back }, - DepthTest { func: DepthTest.Less }, + DepthTest { depthFunction: DepthTest.Less }, DepthMask { mask: false }, BlendState { srcRGB: BlendState.SrcAlpha @@ -197,7 +197,7 @@ Entity { renderPasses: RenderPass { renderStates: [ CullFace { mode : CullFace.Back }, - DepthTest { func: DepthTest.Less }, + DepthTest { depthFunction: DepthTest.Less }, DepthMask { mask: false }, BlendState { srcRGB: BlendState.SrcAlpha diff --git a/examples/qt3d/wave/WaveEffect.qml b/examples/qt3d/wave/WaveEffect.qml index 393a45075..ac132d235 100644 --- a/examples/qt3d/wave/WaveEffect.qml +++ b/examples/qt3d/wave/WaveEffect.qml @@ -98,7 +98,7 @@ Effect { // Disable depth testing and use simple additive blending renderStates: [ - DepthTest { func: DepthTest.Always }, + DepthTest { depthFunction: DepthTest.Always }, DepthMask { mask: true }, BlendState { srcRGB: BlendState.One diff --git a/src/plugins/sceneparsers/gltf/gltfparser.cpp b/src/plugins/sceneparsers/gltf/gltfparser.cpp index abb3f8559..85f04e265 100644 --- a/src/plugins/sceneparsers/gltf/gltfparser.cpp +++ b/src/plugins/sceneparsers/gltf/gltfparser.cpp @@ -1507,7 +1507,7 @@ QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonVal if (functionName == QStringLiteral("depthFunc")) { type = GL_DEPTH_TEST; QDepthTest *depthTest = new QDepthTest; - depthTest->setFunc((QDepthTest::DepthFunc)values.at(0).toInt(GL_LESS)); + depthTest->setDepthFunction((QDepthTest::DepthFunction)values.at(0).toInt(GL_LESS)); return depthTest; } diff --git a/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml b/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml index 596786d28..9fe945a91 100644 --- a/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml +++ b/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml @@ -106,7 +106,7 @@ Material { } AlphaCoverage { id: alphaCoverageState } - DepthTest { id: depthTestState; func: DepthTest.Less } + DepthTest { id: depthTestState; depthFunction: DepthTest.Less } techniques: [ // OpenGL 3.1 diff --git a/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml b/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml index bda4a1d11..13091a3c6 100644 --- a/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml +++ b/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml @@ -111,7 +111,7 @@ Entity { renderStates: [ // cull front faces CullFace { mode: CullFace.Front }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] } }, @@ -127,7 +127,7 @@ Entity { shaderProgram: gl2es2SkyboxShader renderStates: [ CullFace { mode: CullFace.Front }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] } }, @@ -143,7 +143,7 @@ Entity { shaderProgram: gl2es2SkyboxShader renderStates: [ CullFace { mode: CullFace.Front }, - DepthTest { func: DepthTest.LessOrEqual } + DepthTest { depthFunction: DepthTest.LessOrEqual } ] } } 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: |