From d43268b3175f63fad1bb6a7a146682f010de861f Mon Sep 17 00:00:00 2001 From: Seth Archambault Date: Sun, 29 Nov 2020 04:15:51 -0500 Subject: [PATCH] Added GLFW_OPENGL_FORWARD_COMPAT for Apple Support (#1445) Without GLFW_OPENGL_FORWARD_COMPAT, running this as a standalone will yield the error: ``` NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above ``` --- examples/others/rlgl_standalone.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/others/rlgl_standalone.c b/examples/others/rlgl_standalone.c index 0ab3229e5..9aea2b478 100644 --- a/examples/others/rlgl_standalone.c +++ b/examples/others/rlgl_standalone.c @@ -104,6 +104,10 @@ int main(void) glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); //glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); +#if defined(__APPLE__) + glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE ); +#endif + GLFWwindow *window = glfwCreateWindow(screenWidth, screenHeight, "rlgl standalone", NULL, NULL);