From 7fe746c99d3effa351387cde411fe32d08a3e81e Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Sat, 25 Dec 2021 16:58:51 -0500 Subject: [PATCH] Finally made working version with MacOS Cocoa. Have to force the correct version of OpenGL at the window creation --- Navigator/src/Platform/OpenGL/OpenGLWindow.cpp | 9 ++++++++- Navigator/vendor/imgui | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp b/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp index e7c3d6d..3c25327 100644 --- a/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp +++ b/Navigator/src/Platform/OpenGL/OpenGLWindow.cpp @@ -39,6 +39,13 @@ namespace Navigator { NAV_INFO("Initializing GLFW ... Returned value {0}", passed); glfwSetErrorCallback(GLFWErrorCallback); } + +#ifdef __APPLE__ + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT,true); +#endif m_window = glfwCreateWindow((int)m_data.width, (int)m_data.height, m_data.name.c_str(), nullptr, nullptr); @@ -159,4 +166,4 @@ namespace Navigator { { return m_data.vsyncFlag; } -} \ No newline at end of file +} diff --git a/Navigator/vendor/imgui b/Navigator/vendor/imgui index 37435d5..1b5d6db 160000 --- a/Navigator/vendor/imgui +++ b/Navigator/vendor/imgui @@ -1 +1 @@ -Subproject commit 37435d59625642f246f8ee2ecace0326dcf90fbd +Subproject commit 1b5d6dbc7c1c24aa4c32defb88026c8143e757bf