Skip to content

Commit

Permalink
Merge pull request #84929 from bruvzg/gl_prop
Browse files Browse the repository at this point in the history
[macOS] Cleanup default GL driver setting.
  • Loading branch information
akien-mga committed Nov 15, 2023
2 parents 6d47eff + cf56b88 commit c851a46
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit c851a46

Please sign in to comment.