From 3964b273459c2999f33d51b96afe6fb68f07d52f Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Sat, 10 Jul 2021 23:40:45 +0100 Subject: Disable RHI Renderer by default RHI renderer use ShaderTools which is GPL licensed. This patch disables the plugin by default until Qt3D provides a suitable replacement for the dependency. To enable the RHI backend, compile Qt3D and pass parameter -DFEATURE_qt3d_rhi_renderer=ON to cmake. Unfortunate side effect of RHI backend being disabled is that when using Scene3D, the QtQuick renderer must be configured to use the opengl backend. [ChangeLog] RHI Backend is not longer built by default Task-number: QTBUG-94960 Pick-to: 6.1 6.2 Change-Id: I0bff7523e159b800734b58bfef37e5088d0a0d41 Reviewed-by: Paul Lemire --- examples/qt3d/simplecustommaterial/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'examples/qt3d/simplecustommaterial/main.cpp') diff --git a/examples/qt3d/simplecustommaterial/main.cpp b/examples/qt3d/simplecustommaterial/main.cpp index da299e913..beb00b7b3 100644 --- a/examples/qt3d/simplecustommaterial/main.cpp +++ b/examples/qt3d/simplecustommaterial/main.cpp @@ -51,6 +51,7 @@ #include #include #include +#include void setSurfaceFormat() { @@ -67,6 +68,10 @@ void setSurfaceFormat() format.setSamples(4); format.setStencilBufferSize(8); QSurfaceFormat::setDefaultFormat(format); + +#if !QT_CONFIG(qt3d_rhi_renderer) + qputenv("QSG_RHI_BACKEND", "opengl"); +#endif } int main(int argc, char **argv) -- cgit v1.2.3