summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2023-11-10 15:47:03 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2023-11-13 09:58:18 +0100
commita3ac80da3e843f824831ad143d2f215eeffce139 (patch)
tree9addc29325e27ff45c2c98b406797c7b962d3cf9
parentd217bb8cbc9e120eb0ee3518c91850b338320802 (diff)
Make custom-extension example work on Nvidia EGLStreams
Fixes: QTBUG-111022 Pick-to: 6.6 6.5 Change-Id: I766eeb83dc019acab7fe0c8d29412ea28b8fbc56 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
-rw-r--r--examples/wayland/custom-extension/compositor/main.cpp3
-rw-r--r--examples/wayland/custom-shell/compositor/main.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/examples/wayland/custom-extension/compositor/main.cpp b/examples/wayland/custom-extension/compositor/main.cpp
index 458f5b9a3..69e34d2dc 100644
--- a/examples/wayland/custom-extension/compositor/main.cpp
+++ b/examples/wayland/custom-extension/compositor/main.cpp
@@ -13,6 +13,9 @@
int main(int argc, char *argv[])
{
+ // ShareOpenGLContexts is needed for using the threaded renderer
+ // on Nvidia EGLStreams
+ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QGuiApplication app(argc, argv);
QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml"));
diff --git a/examples/wayland/custom-shell/compositor/main.cpp b/examples/wayland/custom-shell/compositor/main.cpp
index 17ab3a03d..72f233e8e 100644
--- a/examples/wayland/custom-shell/compositor/main.cpp
+++ b/examples/wayland/custom-shell/compositor/main.cpp
@@ -18,6 +18,9 @@ static void registerTypes()
int main(int argc, char *argv[])
{
+ // ShareOpenGLContexts is needed for using the threaded renderer
+ // on Nvidia EGLStreams
+ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QGuiApplication app(argc, argv);
registerTypes();
QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml"));