diff options
Diffstat (limited to 'src/plugins/scenegraph/d3d12/qsgd3d12context.cpp')
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12context.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12context.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12context.cpp index 0bb342226b..d43dcd5997 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12context.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12context.cpp @@ -97,4 +97,14 @@ QSurfaceFormat QSGD3D12Context::defaultSurfaceFormat() const return QSurfaceFormat::defaultFormat(); } +QSGRendererInterface *QSGD3D12Context::rendererInterface(QSGRenderContext *renderContext) +{ + QSGD3D12RenderContext *rc = static_cast<QSGD3D12RenderContext *>(renderContext); + if (!rc->engine()) { + qWarning("No D3D12 engine available yet (no render thread due to window not exposed?)"); + return nullptr; + } + return rc->engine(); +} + QT_END_NAMESPACE |