Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Cleanup default GL driver setting. #84929

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,15 +1753,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
String driver_hints_egl = "";
#ifdef GLES3_ENABLED
driver_hints = "opengl3";
driver_hints_angle = "opengl3,opengl3_angle";
driver_hints_egl = "opengl3,opengl3_es";
driver_hints_angle = "opengl3,opengl3_angle"; // macOS, Windows.
driver_hints_egl = "opengl3,opengl3_es"; // Linux.
#endif

String default_driver = driver_hints.get_slice(",", 0);
String default_driver_macos = default_driver;
#if defined(GLES3_ENABLED) && defined(EGL_STATIC) && defined(MACOS_ENABLED)
default_driver_macos = "opengl3_angle"; // Default to ANGLE if it's built-in.
#endif
String default_driver_macos = driver_hints_angle.get_slice(",", 1);

GLOBAL_DEF_RST_NOVAL("rendering/gl_compatibility/driver", default_driver);
GLOBAL_DEF_RST_NOVAL(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.windows", PROPERTY_HINT_ENUM, driver_hints_angle), default_driver);
Expand Down
Loading