From 66e8a81fa7dbf2e4281c892ad514846780165fa5 Mon Sep 17 00:00:00 2001 From: nee-wom <16381829+nee-wom@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:30:34 +0200 Subject: [PATCH] EGL: GLFW_ANGLE_PLATFORM_TYPE_VULKAN on macOS --- CONTRIBUTORS.md | 1 + README.md | 1 + src/cocoa_window.m | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1371aedb..e520362f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -294,6 +294,7 @@ video tutorials. - Jonas Ådahl - Lasse Öörni - Leonard König + - nee-wom - All the unmentioned and anonymous contributors in the GLFW community, for bug reports, patches, feedback, testing and encouragement diff --git a/README.md b/README.md index 10044faf..81348f82 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ information on what to include when reporting a bug. - [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless` - [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to `GLFW_NATIVE_CONTEXT_API` (#2518) + - [EGL] Enabled init hint parameter `GLFW_ANGLE_PLATFORM_TYPE_VULKAN` for macOS ## Contact diff --git a/src/cocoa_window.m b/src/cocoa_window.m index e69b5fe0..06aa274c 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1899,6 +1899,12 @@ EGLenum _glfwGetEGLPlatformCocoa(EGLint** attribs) type = EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE; } + if (_glfw.egl.ANGLE_platform_angle_vulkan) + { + if (_glfw.hints.init.angleType == GLFW_ANGLE_PLATFORM_TYPE_VULKAN) + type = EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE; + } + if (type) { *attribs = _glfw_calloc(3, sizeof(EGLint));