summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorSeth Archambault <[email protected]>2020-11-29 04:15:51 -0500
committerGitHub <[email protected]>2020-11-29 10:15:51 +0100
commitd43268b3175f63fad1bb6a7a146682f010de861f (patch)
tree731117ba35d5f4b959a7e575d588dd50d63c2ce2 /examples
parent0322fc28d4c2c794adfb9b95a3d968a590109bb0 (diff)
downloadraylib-d43268b3175f63fad1bb6a7a146682f010de861f.tar.gz
raylib-d43268b3175f63fad1bb6a7a146682f010de861f.zip
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 ```
Diffstat (limited to 'examples')
-rw-r--r--examples/others/rlgl_standalone.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/others/rlgl_standalone.c b/examples/others/rlgl_standalone.c
index 0ab3229e..9aea2b47 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);