This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
impeller/playground/backend/gles Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ PlaygroundImplGLES::PlaygroundImplGLES(PlaygroundSwitches switches)
6262 handle_ (nullptr , &DestroyWindowHandle),
6363 worker_(std::shared_ptr<ReactorWorker>(new ReactorWorker())),
6464 use_angle_(switches.use_angle) {
65-
6665 if (use_angle_) {
6766 angle_glesv2_ = dlopen (" libGLESv2.dylib" , RTLD_LAZY);
6867 FML_CHECK (angle_glesv2_ != nullptr );
@@ -71,8 +70,14 @@ PlaygroundImplGLES::PlaygroundImplGLES(PlaygroundSwitches switches)
7170 ::glfwDefaultWindowHints ();
7271
7372#if FML_OS_MACOSX
74- // ES Profiles are not supported on Mac.
75- ::glfwWindowHint (GLFW_CLIENT_API, GLFW_OPENGL_API);
73+ if (use_angle_) {
74+ ::glfwWindowHint (GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
75+ ::glfwWindowHint (GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
76+ ::glfwWindowHint (GLFW_CONTEXT_VERSION_MAJOR, 2 );
77+ ::glfwWindowHint (GLFW_CONTEXT_VERSION_MINOR, 0 );
78+ } else {
79+ ::glfwWindowHint (GLFW_CLIENT_API, GLFW_OPENGL_API);
80+ }
7681#else // FML_OS_MACOSX
7782 ::glfwWindowHint (GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
7883 ::glfwWindowHint (GLFW_CONTEXT_VERSION_MAJOR, 2 );
You can’t perform that action at this time.
0 commit comments