Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OpenGL 3 displays on macos #1444

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

j-w-c-b
Copy link
Contributor

@j-w-c-b j-w-c-b commented May 28, 2023

When creating a mac display wth the ALLEGRO_OPENGL_3_0 flag, set the pixel attribute NSOpenGLPFAOpenGLProfile to NSOpenGLProfileVersion3_2Core to enable modern OpenGL. This conflicts with NSOpenGLPFAWindow, so that is dropped.

Fix checking for ALLEGRO_RENDER_METHOD in the required options to enable NSOpenGLPFAAccelerated. I'm not sure if that makes a difference, but the old code was using the option as a value and not a bit offset.

Duplicate the shaders in GLSL 3.3+ syntax (adding a _gl3 suffix to the static variables). Check the shader language version, and select the _gl3 versions when using a version != 1.20 on macos.

When compiling the shaders on macos, check for the supported shader version. If != 1.20, insert a #version line based on the value returned by the OpenGL context.

[https://github.com//issues/1443]

When creating a mac display wth the ALLEGRO_OPENGL_3_0 flag, set
the pixel attribute NSOpenGLPFAOpenGLProfile to NSOpenGLProfileVersion3_2Core
to enable modern OpenGL. This conflicts with NSOpenGLPFAWindow, so that
is dropped.

Fix checking for ALLEGRO_RENDER_METHOD in the required options to enable
NSOpenGLPFAAccelerated. I'm not sure if that makes a difference, but the
old code was using the option as a value and not a bit offset.

Duplicate the shaders in GLSL 3.3+ syntax (adding a _gl3 suffix to the
static variables). Check the shader language version, and select the
_gl3 versions when using a version != 1.20 on macos.

When compiling the shaders on macos, check for the supported shader
version. If != 1.20, insert a #version line based on the value returned
by the OpenGL context.
@SiegeLord SiegeLord added this to the 5.2.9 milestone Aug 6, 2023
@alemart alemart mentioned this pull request Oct 2, 2023
@SiegeLord SiegeLord modified the milestones: 5.2.9, 5.2.10 Nov 19, 2023
@SiegeLord SiegeLord modified the milestones: 5.2.10, 5.2.11 Nov 25, 2024
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.

2 participants