From 8890253775bbfe6969bc8d34ed57160b66bea928 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 17 Oct 2023 09:43:07 +0200 Subject: [PATCH] Fix GLFW error (0x10007): NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above --- Backends/RmlUi_Backend_GLFW_GL3.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Backends/RmlUi_Backend_GLFW_GL3.cpp b/Backends/RmlUi_Backend_GLFW_GL3.cpp index 558963992..2b6b8300a 100644 --- a/Backends/RmlUi_Backend_GLFW_GL3.cpp +++ b/Backends/RmlUi_Backend_GLFW_GL3.cpp @@ -84,6 +84,10 @@ bool Backend::Initialize(const char* name, int width, int height, bool allow_res glfwWindowHint(GLFW_RESIZABLE, allow_resize ? GLFW_TRUE : GLFW_FALSE); glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); +#if __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + GLFWwindow* window = glfwCreateWindow(width, height, name, nullptr, nullptr); if (!window) return false;