summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Brock <robert.brock@kdab.com>2016-03-01 14:23:19 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-03-08 15:47:08 +0000
commit7284b37bf81b08530afcc141b3cf2f5358b735c1 (patch)
tree5f5c9c4bc8603adf0e05d2134c0bb14621ba09ac
parente0b120eff6a2de9214bb37323b5a0b444620027a (diff)
QStencilOpSeparate enum renaming
Removed stencil prefix from enums incr -> increment decr -> decrement op -> operation Change-Id: I24997b5c2d5d99197f889351592fb5c2e993f0f1 Task-number: QTBUG-51436 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml6
-rw-r--r--src/render/renderstates/qstencilopseparate.cpp56
-rw-r--r--src/render/renderstates/qstencilopseparate.h48
3 files changed, 55 insertions, 55 deletions
diff --git a/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml b/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml
index 61c721fe1..9dc36d7ad 100644
--- a/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml
+++ b/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml
@@ -103,9 +103,9 @@ Viewport {
referenceValue: 0; comparisonMask: 0
}
},
- StencilOp {
- front.stencilDepthPass: StencilOpSeparate.Decr
- back.stencilDepthPass: StencilOpSeparate.Incr
+ Operation {
+ front.stencilDepthPass: StencilOpSeparate.Decrement
+ back.stencilDepthPass: StencilOpSeparate.Increment
},
ColorMask { redMasked: false; greenMasked: false; blueMasked: false; alphaMasked: false }
]
diff --git a/src/render/renderstates/qstencilopseparate.cpp b/src/render/renderstates/qstencilopseparate.cpp
index cefa20178..a1c3433fa 100644
--- a/src/render/renderstates/qstencilopseparate.cpp
+++ b/src/render/renderstates/qstencilopseparate.cpp
@@ -47,23 +47,23 @@ namespace Qt3DRender {
class QStencilOpSeparatePrivate : public QObjectPrivate
{
public:
- QStencilOpSeparatePrivate(QStencilOpSeparate::StencilFaceMode mode)
+ QStencilOpSeparatePrivate(QStencilOpSeparate::FaceMode mode)
: QObjectPrivate()
, m_face(mode)
- , m_stencilFailOp(QStencilOpSeparate::Keep)
- , m_depthFailOp(QStencilOpSeparate::Keep)
- , m_stencilDepthPassOp(QStencilOpSeparate::Keep)
+ , m_stencilFailOperation(QStencilOpSeparate::Keep)
+ , m_depthFailOperation(QStencilOpSeparate::Keep)
+ , m_stencilDepthPassOperation(QStencilOpSeparate::Keep)
{
}
- QStencilOpSeparate::StencilFaceMode m_face;
- QStencilOpSeparate::StencilOp m_stencilFailOp;
- QStencilOpSeparate::StencilOp m_depthFailOp;
- QStencilOpSeparate::StencilOp m_stencilDepthPassOp;
+ QStencilOpSeparate::FaceMode m_face;
+ QStencilOpSeparate::Operation m_stencilFailOperation;
+ QStencilOpSeparate::Operation m_depthFailOperation;
+ QStencilOpSeparate::Operation m_stencilDepthPassOperation;
};
-QStencilOpSeparate::QStencilOpSeparate(StencilFaceMode mode, QObject *parent)
+QStencilOpSeparate::QStencilOpSeparate(FaceMode mode, QObject *parent)
: QObject(*new QStencilOpSeparatePrivate(mode), parent)
{
}
@@ -72,55 +72,55 @@ QStencilOpSeparate::~QStencilOpSeparate()
{
}
-QStencilOpSeparate::StencilFaceMode QStencilOpSeparate::faceMode() const
+QStencilOpSeparate::FaceMode QStencilOpSeparate::faceMode() const
{
Q_D(const QStencilOpSeparate);
return d->m_face;
}
-void QStencilOpSeparate::setStencilFail(QStencilOpSeparate::StencilOp op)
+void QStencilOpSeparate::setStencilFail(QStencilOpSeparate::Operation operation)
{
Q_D(QStencilOpSeparate);
- if (d->m_stencilFailOp != op) {
- d->m_stencilFailOp = op;
- Q_EMIT stencilFailChanged(op);
+ if (d->m_stencilFailOperation != operation) {
+ d->m_stencilFailOperation = operation;
+ Q_EMIT stencilFailChanged(operation);
}
}
-QStencilOpSeparate::StencilOp QStencilOpSeparate::stencilFail() const
+QStencilOpSeparate::Operation QStencilOpSeparate::stencilFail() const
{
Q_D(const QStencilOpSeparate);
- return d->m_stencilFailOp;
+ return d->m_stencilFailOperation;
}
-void QStencilOpSeparate::setDepthFail(QStencilOpSeparate::StencilOp op)
+void QStencilOpSeparate::setDepthFail(QStencilOpSeparate::Operation operation)
{
Q_D(QStencilOpSeparate);
- if (d->m_depthFailOp != op) {
- d->m_depthFailOp = op;
- Q_EMIT depthFailChanged(op);
+ if (d->m_depthFailOperation != operation) {
+ d->m_depthFailOperation = operation;
+ Q_EMIT depthFailChanged(operation);
}
}
-QStencilOpSeparate::StencilOp QStencilOpSeparate::depthFail() const
+QStencilOpSeparate::Operation QStencilOpSeparate::depthFail() const
{
Q_D(const QStencilOpSeparate);
- return d->m_depthFailOp;
+ return d->m_depthFailOperation;
}
-void QStencilOpSeparate::setStencilDepthPass(QStencilOpSeparate::StencilOp op)
+void QStencilOpSeparate::setStencilDepthPass(QStencilOpSeparate::Operation operation)
{
Q_D(QStencilOpSeparate);
- if (d->m_stencilDepthPassOp != op) {
- d->m_stencilDepthPassOp = op;
- Q_EMIT stencilDepthPassChanged(op);
+ if (d->m_stencilDepthPassOperation != operation) {
+ d->m_stencilDepthPassOperation = operation;
+ Q_EMIT stencilDepthPassChanged(operation);
}
}
-QStencilOpSeparate::StencilOp QStencilOpSeparate::stencilDepthPass() const
+QStencilOpSeparate::Operation QStencilOpSeparate::stencilDepthPass() const
{
Q_D(const QStencilOpSeparate);
- return d->m_stencilDepthPassOp;
+ return d->m_stencilDepthPassOperation;
}
} // namespace Qt3DRender
diff --git a/src/render/renderstates/qstencilopseparate.h b/src/render/renderstates/qstencilopseparate.h
index 0185ca804..e87d2c4f2 100644
--- a/src/render/renderstates/qstencilopseparate.h
+++ b/src/render/renderstates/qstencilopseparate.h
@@ -53,54 +53,54 @@ class QStencilOpSeparatePrivate;
class QT3DRENDERSHARED_EXPORT QStencilOpSeparate : public QObject
{
Q_OBJECT
- Q_PROPERTY(StencilFaceMode faceMode READ faceMode NOTIFY faceModeChanged)
- Q_PROPERTY(StencilOp stencilFail READ stencilFail WRITE setStencilFail NOTIFY stencilFailChanged)
- Q_PROPERTY(StencilOp depthFail READ depthFail WRITE setDepthFail NOTIFY depthFailChanged)
- Q_PROPERTY(StencilOp stencilDepthPass READ stencilDepthPass WRITE setStencilDepthPass NOTIFY stencilDepthPassChanged)
+ Q_PROPERTY(FaceMode faceMode READ faceMode NOTIFY faceModeChanged)
+ Q_PROPERTY(Operation stencilFail READ stencilFail WRITE setStencilFail NOTIFY stencilFailChanged)
+ Q_PROPERTY(Operation depthFail READ depthFail WRITE setDepthFail NOTIFY depthFailChanged)
+ Q_PROPERTY(Operation stencilDepthPass READ stencilDepthPass WRITE setStencilDepthPass NOTIFY stencilDepthPassChanged)
public:
- enum StencilFaceMode
+ enum FaceMode
{
Front = 0x0404,
Back = 0x0405,
FrontAndBack = 0x0408
};
- Q_ENUM(StencilFaceMode)
+ Q_ENUM(FaceMode)
- enum StencilOp
+ enum Operation
{
Zero = 0,
Keep = 0x1E00,
Replace = 0x1E01,
- Incr = 0x1E02,
- Decr = 0x1E03,
- IncrWrap = 0x8507,
- DecrWrap = 0x8508,
+ Increment = 0x1E02,
+ Decrement = 0x1E03,
+ IncrementWrap = 0x8507,
+ DecrementWrap = 0x8508,
Invert = 0x150A
};
- Q_ENUM(StencilOp)
+ Q_ENUM(Operation)
~QStencilOpSeparate();
- StencilFaceMode faceMode() const;
+ FaceMode faceMode() const;
- StencilOp stencilFail() const;
- StencilOp depthFail() const;
- StencilOp stencilDepthPass() const;
+ Operation stencilFail() const;
+ Operation depthFail() const;
+ Operation stencilDepthPass() const;
public Q_SLOTS:
- void setStencilFail(StencilOp op);
- void setDepthFail(StencilOp op);
- void setStencilDepthPass(StencilOp op);
+ void setStencilFail(Operation operation);
+ void setDepthFail(Operation operation);
+ void setStencilDepthPass(Operation operation);
Q_SIGNALS:
- void stencilFailChanged(StencilOp stencilFail);
- void depthFailChanged(StencilOp depthFail);
- void stencilDepthPassChanged(StencilOp stencilDepthPass);
- void faceModeChanged(StencilFaceMode faceMode);
+ void stencilFailChanged(Operation stencilFail);
+ void depthFailChanged(Operation depthFail);
+ void stencilDepthPassChanged(Operation stencilDepthPass);
+ void faceModeChanged(FaceMode faceMode);
private:
- explicit QStencilOpSeparate(StencilFaceMode mode, QObject *parent = 0);
+ explicit QStencilOpSeparate(FaceMode mode, QObject *parent = 0);
Q_DECLARE_PRIVATE(QStencilOpSeparate)
friend class QStencilOpPrivate;