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>
This commit is contained in:
parent
60c4810c73
commit
e27fa6e2b5
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"purpose": "Provides a Direct3D 12 backend for the Qt Quick Scenegraph",
|
||||
"condition": "tests.d3d12",
|
||||
"output": [
|
||||
"privateFeature"
|
||||
"publicFeature"
|
||||
]
|
||||
},
|
||||
"quick-animatedimage": {
|
||||
|
|
Loading…
Reference in New Issue