From 6cda13d10b11db244f6e325f54aacf49b31dfddc Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 13 May 2021 01:24:48 -0500 Subject: [PATCH] [nostalgia/core/glfw] Fix OpenGL config for Mac --- src/nostalgia/core/glfw/gfx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/core/glfw/gfx.cpp b/src/nostalgia/core/glfw/gfx.cpp index 09e7649f..df5d14dd 100644 --- a/src/nostalgia/core/glfw/gfx.cpp +++ b/src/nostalgia/core/glfw/gfx.cpp @@ -29,7 +29,11 @@ ox::Error initGfx(Context *ctx) noexcept { auto id = ctx->windowerData(); glfwSetErrorCallback(handleGlfwError); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + if constexpr(ox::defines::OS == ox::defines::OS::Darwin) { + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); + } glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); id->window = glfwCreateWindow(240 * Scale, 160 * Scale, "nostalgia", nullptr, nullptr); if (id->window == nullptr) {