summaryrefslogtreecommitdiffstats
path: root/src/render/renderstates/qdepthtest.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-04-03 11:07:10 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-04-10 21:09:38 +0000
commitb4370262e1de54d34dc39cc0cfe8fa1b08f1238a (patch)
tree89817bc3c186fdf2f29fd33d1271ad45b30de8fc /src/render/renderstates/qdepthtest.cpp
parent5964a47d20cfd5164f67e87ad722382bbdcb9731 (diff)
QDepthTest creates creation changes
Change-Id: I569ced3777ee0963e5471d1a8f623d8cfaaa900e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/renderstates/qdepthtest.cpp')
-rw-r--r--src/render/renderstates/qdepthtest.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/render/renderstates/qdepthtest.cpp b/src/render/renderstates/qdepthtest.cpp
index 990aabc85..64a1bff74 100644
--- a/src/render/renderstates/qdepthtest.cpp
+++ b/src/render/renderstates/qdepthtest.cpp
@@ -39,29 +39,13 @@
****************************************************************************/
#include "qdepthtest.h"
-#include "qrenderstate_p.h"
-#include <private/qnode_p.h>
-#include <Qt3DCore/qscenepropertychange.h>
+#include "qdepthtest_p.h"
+#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QDepthTest;
-
-class QDepthTestPrivate : public QRenderStatePrivate
-{
-public :
- QDepthTestPrivate()
- : QRenderStatePrivate(QRenderStatePrivate::DepthTest)
- , m_depthFunction(QDepthTest::Never)
- {
- }
-
- Q_DECLARE_PUBLIC(QDepthTest)
- QDepthTest::DepthFunction m_depthFunction;
-};
-
void QDepthTest::copy(const QNode *ref)
{
QRenderState::copy(ref);
@@ -94,6 +78,15 @@ void QDepthTest::setDepthFunction(QDepthTest::DepthFunction depthFunction)
}
}
+Qt3DCore::QNodeCreatedChangeBasePtr QDepthTest::createNodeCreationChange() const
+{
+ auto creationChange = QRenderStateCreatedChangePtr<QDepthTestData>::create(this);
+ auto &data = creationChange->data;
+ Q_D(const QDepthTest);
+ data.depthFunction = d->m_depthFunction;
+ return creationChange;
+}
+
} // namespace Qt3DRender
QT_END_NAMESPACE