Here is the rewritten text:
After successfully porting a project from Linux/Windows to macOS, I was able to compile the final executable on my M1 MacBook Pro running macOS Sonoma 14.6.1 without any major issues.
The system probes for four OpenGL extensions: GL_ARB_shader_objects
, GL_ARB_shading_language_100
, GL_ARB_vertex_shader
and GL_ARB_fragment_shader
and throws an error.
The application appears to be checking for support of the OpenGL 2.1 API.
I discovered an application known simply as “and” successfully verified that three distinct settings could be located: GL Legacy
GL Core 3
and GL Core 4
The final two are likely to contemplate each resolving to OpenGL 4.1.
As I understand it, I’m operating under the assumption that my code runs within an OpenGL 4.1 context, but this perceived environment apparently triggers errors during the probing process.
I attempted adding a compatibility profile at the top of the initialization code to see if that would resolve the issue.
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
However, the next assertion still throws an error.
if (!SDL_GL_ExtensionSupported("GL_ARB_shader_objects"))
{
LOG(LogError) << "GL Extensions not supported. return OpenGLContext.GL_ARB_shader_objects == null;
Is my assumption correct that I want to diversify the profiles for supporting OpenGL 2.1 extensions?
What other diagnostic techniques can you employ to identify the root cause of this phenomenon and develop a comprehensive plan for resolution?