summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Brock <robert.brock@kdab.com>2016-02-26 10:38:03 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-03-05 01:07:39 +0000
commit7fb39670fd6cf418bc16256d3778a5c85b158dfa (patch)
tree50478d8b66b48d7a07edad540585113125bf5275
parentc3ad40d587dd6a1c2d287b2e55b6334beff0817c (diff)
QBlendEquation renamed mode to function
BlendMode became BlendFunction mode became blendFunction removed Func prefix in enums As per API review Change-Id: I95271abc3ba4b8d04b3caf46845e1a5e47d47322 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--examples/qt3d/clip-planes-qml/PlaneVisualizationMaterial.qml4
-rw-r--r--examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml2
-rw-r--r--examples/qt3d/playground-qml/ComplexTechnique.qml2
-rw-r--r--examples/qt3d/transparency-qml-scene3d/Scene.qml4
-rw-r--r--examples/qt3d/transparency-qml/main.qml4
-rw-r--r--src/plugins/sceneparsers/gltf/gltfparser.cpp2
-rw-r--r--src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml6
-rw-r--r--src/render/defaults/qphongalphamaterial.cpp2
-rw-r--r--src/render/renderstates/qblendequation.cpp18
-rw-r--r--src/render/renderstates/qblendequation.h18
-rw-r--r--src/render/renderstates/renderstateset.cpp2
11 files changed, 32 insertions, 32 deletions
diff --git a/examples/qt3d/clip-planes-qml/PlaneVisualizationMaterial.qml b/examples/qt3d/clip-planes-qml/PlaneVisualizationMaterial.qml
index fbe682b48..15edddb6c 100644
--- a/examples/qt3d/clip-planes-qml/PlaneVisualizationMaterial.qml
+++ b/examples/qt3d/clip-planes-qml/PlaneVisualizationMaterial.qml
@@ -101,7 +101,7 @@ Material {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
},
- BlendEquation {mode: BlendEquation.FuncAdd}
+ BlendEquation {blendFunction: BlendEquation.FuncAdd}
]
annotations: Annotation { name: "pass"; value: "material" }
}
@@ -123,7 +123,7 @@ Material {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
},
- BlendEquation {mode: BlendEquation.FuncAdd}
+ BlendEquation {blendFunction: BlendEquation.Add}
]
annotations: Annotation { name: "pass"; value: "material" }
}
diff --git a/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml b/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml
index 68375d092..ad9acac96 100644
--- a/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml
+++ b/examples/qt3d/playground-qml/AnimatedDiffuseMaterial.qml
@@ -179,7 +179,7 @@ Material {
annotations : [Annotation {name : "Name"; value : "Texture" }]
bindings: ParameterMapping {parameterName: "texture"; shaderVariableName: "tex"; bindingType: ParameterMapping.Uniform}
renderStates : [BlendState {srcRGB: BlendState.One; dstRGB : BlendState.One},
- BlendEquation {mode: BlendEquation.FuncAdd},
+ BlendEquation {blendFunction: BlendEquation.Add},
CullFace { mode : CullFace.Back },
DepthTest { depthFunction : DepthTest.LessOrEqual}
]
diff --git a/examples/qt3d/playground-qml/ComplexTechnique.qml b/examples/qt3d/playground-qml/ComplexTechnique.qml
index 3e1e48479..2de37f8dc 100644
--- a/examples/qt3d/playground-qml/ComplexTechnique.qml
+++ b/examples/qt3d/playground-qml/ComplexTechnique.qml
@@ -154,7 +154,7 @@ Technique {
RenderPass {
annotations : [Annotation {name : "Name"; value : "Lighting" }]
renderStates : [BlendState {srcRGB: BlendState.One; dstRGB : BlendState.One},
- BlendEquation {mode: BlendEquation.FuncAdd},
+ BlendEquation {blendFunction: BlendEquation.Add},
CullFace { mode : CullFace.Back },
DepthTest { depthFunction : DepthTest.LessOrEqual}
]
diff --git a/examples/qt3d/transparency-qml-scene3d/Scene.qml b/examples/qt3d/transparency-qml-scene3d/Scene.qml
index a2d24129a..a43f505ef 100644
--- a/examples/qt3d/transparency-qml-scene3d/Scene.qml
+++ b/examples/qt3d/transparency-qml-scene3d/Scene.qml
@@ -160,7 +160,7 @@ Entity {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
}
- ,BlendEquation {mode: BlendEquation.FuncAdd}
+ ,BlendEquation {blendFunction: BlendEquation.Add}
]
shaderProgram: alphaPhong
@@ -184,7 +184,7 @@ Entity {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
}
- ,BlendEquation {mode: BlendEquation.FuncAdd}
+ ,BlendEquation {blendFunction: BlendEquation.Add}
]
shaderProgram: alphaPhong
diff --git a/examples/qt3d/transparency-qml/main.qml b/examples/qt3d/transparency-qml/main.qml
index c11b887d8..eb2044b7d 100644
--- a/examples/qt3d/transparency-qml/main.qml
+++ b/examples/qt3d/transparency-qml/main.qml
@@ -178,7 +178,7 @@ Entity {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
}
- ,BlendEquation {mode: BlendEquation.FuncAdd}
+ ,BlendEquation {blendFunction: BlendEquation.Add}
]
shaderProgram: alphaPhong
@@ -203,7 +203,7 @@ Entity {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
}
- ,BlendEquation {mode: BlendEquation.FuncAdd}
+ ,BlendEquation {blendFunction: BlendEquation.Add}
]
shaderProgram: alphaPhong
diff --git a/src/plugins/sceneparsers/gltf/gltfparser.cpp b/src/plugins/sceneparsers/gltf/gltfparser.cpp
index 8202f87c9..7df17473f 100644
--- a/src/plugins/sceneparsers/gltf/gltfparser.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfparser.cpp
@@ -1474,7 +1474,7 @@ QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonVal
type = GL_BLEND;
//TODO: support settings blendEquation alpha
QBlendEquation *blendEquation = new QBlendEquation;
- blendEquation->setMode((QBlendEquation::BlendMode)values.at(0).toInt(GL_FUNC_ADD));
+ blendEquation->setBlendFunction((QBlendEquation::BlendFunction)values.at(0).toInt(GL_FUNC_ADD));
return blendEquation;
}
diff --git a/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml b/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml
index 0a2fea4fb..383d708c8 100644
--- a/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml
+++ b/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml
@@ -95,7 +95,7 @@ Material {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
},
- BlendEquation {mode: BlendEquation.FuncAdd}
+ BlendEquation {blendFunction: BlendEquation.Add}
]
}
},
@@ -117,7 +117,7 @@ Material {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
},
- BlendEquation {mode: BlendEquation.FuncAdd}
+ BlendEquation {blendFunction: BlendEquation.Add}
]
}
},
@@ -139,7 +139,7 @@ Material {
srcRGB: BlendState.SrcAlpha
dstRGB: BlendState.OneMinusSrcAlpha
},
- BlendEquation {mode: BlendEquation.FuncAdd}
+ BlendEquation {blendFunction: BlendEquation.Add}
]
}
}
diff --git a/src/render/defaults/qphongalphamaterial.cpp b/src/render/defaults/qphongalphamaterial.cpp
index 78480f53b..08c0fbe6d 100644
--- a/src/render/defaults/qphongalphamaterial.cpp
+++ b/src/render/defaults/qphongalphamaterial.cpp
@@ -127,7 +127,7 @@ void QPhongAlphaMaterialPrivate::init()
m_depthMask->setMask(false);
m_blendState->setSrcRGB(QBlendState::SrcAlpha);
m_blendState->setDstRGB(QBlendState::OneMinusSrcAlpha);
- m_blendEquation->setMode(QBlendEquation::FuncAdd);
+ m_blendEquation->setBlendFunction(QBlendEquation::Add);
m_phongAlphaGL3RenderPass->setShaderProgram(m_phongAlphaGL3Shader);
m_phongAlphaGL2RenderPass->setShaderProgram(m_phongAlphaGL2ES2Shader);
diff --git a/src/render/renderstates/qblendequation.cpp b/src/render/renderstates/qblendequation.cpp
index e7fec08bb..86a9d39a7 100644
--- a/src/render/renderstates/qblendequation.cpp
+++ b/src/render/renderstates/qblendequation.cpp
@@ -52,19 +52,19 @@ class QBlendEquationPrivate : public QRenderStatePrivate
public:
QBlendEquationPrivate()
: QRenderStatePrivate(QRenderState::BlendEquation)
- , m_mode(QBlendEquation::FuncAdd)
+ , m_blendFunction(QBlendEquation::Add)
{
}
Q_DECLARE_PUBLIC(QBlendEquation)
- QBlendEquation::BlendMode m_mode;
+ QBlendEquation::BlendFunction m_blendFunction;
};
void QBlendEquation::copy(const QNode *ref)
{
QRenderState::copy(ref);
const QBlendEquation *refState = reinterpret_cast<const QBlendEquation*>(ref);
- d_func()->m_mode = refState->d_func()->m_mode;
+ d_func()->m_blendFunction = refState->d_func()->m_blendFunction;
}
QBlendEquation::QBlendEquation(QNode *parent)
@@ -77,18 +77,18 @@ QBlendEquation::~QBlendEquation()
QNode::cleanup();
}
-QBlendEquation::BlendMode QBlendEquation::mode() const
+QBlendEquation::BlendFunction QBlendEquation::blendFunction() const
{
Q_D(const QBlendEquation);
- return d->m_mode;
+ return d->m_blendFunction;
}
-void QBlendEquation::setMode(QBlendEquation::BlendMode mode)
+void QBlendEquation::setBlendFunction(QBlendEquation::BlendFunction blendFunction)
{
Q_D(QBlendEquation);
- if (d->m_mode != mode) {
- d->m_mode = mode;
- emit modeChanged(mode);
+ if (d->m_blendFunction != blendFunction) {
+ d->m_blendFunction = blendFunction;
+ emit blendFunctionChanged(blendFunction);
}
}
diff --git a/src/render/renderstates/qblendequation.h b/src/render/renderstates/qblendequation.h
index 845e70e15..9bd392357 100644
--- a/src/render/renderstates/qblendequation.h
+++ b/src/render/renderstates/qblendequation.h
@@ -52,29 +52,29 @@ class QBlendEquationPrivate;
class QT3DRENDERSHARED_EXPORT QBlendEquation : public QRenderState
{
Q_OBJECT
- Q_PROPERTY(BlendMode mode READ mode WRITE setMode NOTIFY modeChanged)
+ Q_PROPERTY(BlendFunction blendFunction READ blendFunction WRITE setBlendFunction NOTIFY blendFunctionChanged)
public:
- enum BlendMode
+ enum BlendFunction
{
- FuncAdd = 0x8006,
- FuncSubstract = 0x800A,
- FuncReverseSubstract = 0x800B,
+ Add = 0x8006,
+ Subtract = 0x800A,
+ ReverseSubtract = 0x800B,
Min = 0x8007,
Max = 0x8008
};
- Q_ENUM(BlendMode)
+ Q_ENUM(BlendFunction)
explicit QBlendEquation(Qt3DCore::QNode *parent = 0);
~QBlendEquation();
- BlendMode mode() const;
+ BlendFunction blendFunction() const;
public Q_SLOTS:
- void setMode(BlendMode mode);
+ void setBlendFunction(BlendFunction blendFunction);
Q_SIGNALS:
- void modeChanged(BlendMode mode);
+ void blendFunctionChanged(BlendFunction blendFunction);
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 c6c8f6578..8de1bcb46 100644
--- a/src/render/renderstates/renderstateset.cpp
+++ b/src/render/renderstates/renderstateset.cpp
@@ -266,7 +266,7 @@ RenderStateImpl* RenderStateImpl::getOrCreateState(QRenderState *renderState)
}
case QRenderState::BlendEquation: {
QBlendEquation *blendEquation = static_cast<QBlendEquation *>(renderState);
- return getOrCreateRenderStateImpl<BlendEquation>(blendEquation->mode());
+ return getOrCreateRenderStateImpl<BlendEquation>(blendEquation->blendFunction());
}
case QRenderState::BlendState: {
QBlendState *blendState = static_cast<QBlendState *>(renderState);