Inform Coin to use EGL when on Wayland (#21917)

* Inform Coin to use EGL when on Wayland

* Only check for Wayland on Linux and BSD
This commit is contained in:
Bas Ruigrok
2025-06-30 18:12:02 +02:00
committed by GitHub
parent d8889c3ca4
commit 60aa5ff373

View File

@@ -2295,6 +2295,13 @@ void Application::runApplication()
int argc = App::Application::GetARGC();
GUISingleApplication mainApp(argc, App::Application::GetARGV());
#if defined(FC_OS_LINUX) || defined(FC_OS_BSD)
// If QT is running with native Wayland then inform Coin to use EGL
if (QGuiApplication::platformName() == QString::fromStdString("wayland")) {
setenv("COIN_EGL", "1", 1);
}
#endif
// Make sure that we use '.' as decimal point. See also
// http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559846
// and issue #0002891