summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-10-11 13:23:05 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-10-11 12:25:24 +0000
commite27fa6e2b5376e68926bd5bdf70cdb0feba6e09e (patch)
treeadb19db208ca76003ac70206e68ad8c0390b22cc /examples
parent60c4810c73e41e3c4b930206b9f0a5c56a2b9026 (diff)
Use d3d12 feature in rendernode example
Migrate the example away from config_d3d12 and make the feature public. Task-number: QTBUG-56327 Change-Id: I88809b8c41282cd75952d085cfd539a5d80f3f38 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/scenegraph/rendernode/customrenderitem.cpp2
-rw-r--r--examples/quick/scenegraph/rendernode/d3d12renderer.cpp4
-rw-r--r--examples/quick/scenegraph/rendernode/d3d12renderer.h4
-rw-r--r--examples/quick/scenegraph/rendernode/rendernode.pro3
4 files changed, 6 insertions, 7 deletions
diff --git a/examples/quick/scenegraph/rendernode/customrenderitem.cpp b/examples/quick/scenegraph/rendernode/customrenderitem.cpp
index 2465f4cbc7..a92a400922 100644
--- a/examples/quick/scenegraph/rendernode/customrenderitem.cpp
+++ b/examples/quick/scenegraph/rendernode/customrenderitem.cpp
@@ -67,7 +67,7 @@ QSGNode *CustomRenderItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
break;
#endif
case QSGRendererInterface::Direct3D12:
-#ifdef HAS_D3D12
+#if QT_CONFIG(d3d12)
n = new D3D12RenderNode(this);
break;
#endif
diff --git a/examples/quick/scenegraph/rendernode/d3d12renderer.cpp b/examples/quick/scenegraph/rendernode/d3d12renderer.cpp
index d35f82a76a..3b377f1cb1 100644
--- a/examples/quick/scenegraph/rendernode/d3d12renderer.cpp
+++ b/examples/quick/scenegraph/rendernode/d3d12renderer.cpp
@@ -43,7 +43,7 @@
#include <QQuickWindow>
#include <QSGRendererInterface>
-#ifdef HAS_D3D12
+#if QT_CONFIG(d3d12)
#include "vs_shader.hlslh"
#include "ps_shader.hlslh"
@@ -280,4 +280,4 @@ QRectF D3D12RenderNode::rect() const
return QRect(0, 0, m_item->width(), m_item->height());
}
-#endif // HAS_D3D12
+#endif // d3d12
diff --git a/examples/quick/scenegraph/rendernode/d3d12renderer.h b/examples/quick/scenegraph/rendernode/d3d12renderer.h
index f13a1d451c..1d2726819f 100644
--- a/examples/quick/scenegraph/rendernode/d3d12renderer.h
+++ b/examples/quick/scenegraph/rendernode/d3d12renderer.h
@@ -43,7 +43,7 @@
#include <qsgrendernode.h>
-#ifdef HAS_D3D12
+#if QT_CONFIG(d3d12)
class QQuickItem;
@@ -77,6 +77,6 @@ private:
quint8 *cbPtr = nullptr;
};
-#endif // HAS_D3D12
+#endif // d3d12
#endif
diff --git a/examples/quick/scenegraph/rendernode/rendernode.pro b/examples/quick/scenegraph/rendernode/rendernode.pro
index 851d5927bd..968902a5be 100644
--- a/examples/quick/scenegraph/rendernode/rendernode.pro
+++ b/examples/quick/scenegraph/rendernode/rendernode.pro
@@ -18,8 +18,7 @@ OTHER_FILES += \
main.qml \
shader.hlsl
-config_d3d12 {
- DEFINES += HAS_D3D12
+qtConfig(d3d12) {
HEADERS += d3d12renderer.h
SOURCES += d3d12renderer.cpp
LIBS += -ld3d12