From b3b0c9ee023a9ec3741f8c3c5b7630995bb98bcd Mon Sep 17 00:00:00 2001 From: Jupiter Date: Wed, 11 Apr 2018 14:40:18 +0300 Subject: [PATCH] Fix `Error 65543: NSGL` on macOS ## Forward compatibility (GLFW_OPENGL_FORWARD_COMPAT) Fix for error 65543 on macOS: Error `65543`: NSGL: The targeted version of OS X only supports forward-compatible contexts for OpenGL 3.2 and above Quote from docs: GLFW_OPENGL_FORWARD_COMPAT specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. --- example/canvas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/example/canvas.c b/example/canvas.c index 2a7f7a2..2afc587 100644 --- a/example/canvas.c +++ b/example/canvas.c @@ -410,6 +410,7 @@ int main(int argc, char *argv[]) glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); win = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Demo", NULL, NULL); glfwMakeContextCurrent(win); glfwSetWindowUserPointer(win, &ctx);