Skip to content

Conversation

@sixfourtwelve
Copy link

@sixfourtwelve sixfourtwelve commented Nov 17, 2025

When I was trying the examples out, eg collision or any of those that created a glfw window, I'd get the below error

GLFW ERROR: 65543 NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
GLFW error: 65543 NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
r_window_create: Error: Unable to create GLFW window.
r_ctx_create: unable to create window.
[1]    75776 segmentation fault  ../build/examples/collision

Extra information
https://www.glfw.org/faq.html#41---how-do-i-create-an-opengl-30-context

glfw/glfw#107

create and show a window. Error below

GLFW ERROR: 65543 NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
GLFW error: 65543 NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
r_window_create: Error: Unable to create GLFW window.
r_ctx_create: unable to create window.
[1]    75776 segmentation fault  ../build/examples/collision
Copilot AI review requested due to automatic review settings November 17, 2025 22:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a GLFW error on macOS that prevented OpenGL windows from being created. The error occurred because macOS requires both forward-compatible and core profile contexts for OpenGL 3.2 and above, but the code was only setting forward compatibility while using a compatibility profile.

Key changes:

  • Added platform-specific conditional compilation to use GLFW_OPENGL_CORE_PROFILE on macOS instead of GLFW_OPENGL_COMPAT_PROFILE
  • This complements the existing forward-compatibility setting already in place for macOS

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant