Add support for OpenGL 3 displays on macos #1444
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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]