[ad_1]
I am porting a venture from Linux/Home windows to macOS and efficiently patched it sufficient to get the ultimate executable compiled on macOS Sonoma 14.6.1 on a M1 MacBookPro.
This system is probing for 4 OpenGL extensions: GL_ARB_shader_objects
, GL_ARB_shading_language_100
, GL_ARB_vertex_shader
and GL_ARB_fragment_shader
and throws an error.
I did some analysis and if I perceive this web page accurately, it’s probing for OpenGL 2.1
I downloaded an app known as GLview professional and confirmed 3 contexts can be found: GL Legacy
GL Core 3
and GL Core 4
(the final two is perhaps one contemplating they each resolve to OpenGL 4.1)
I’m underneath the idea my code is executing within the OpenGL 4.1 context and that is the explanation I get an error through the probe.
I perceive I can specify utilizing a “compatibility profile” so I attempted the next on the prime of the init code:
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 nonetheless throws an error:
if (!SDL_GL_ExtensionSupported("GL_ARB_shader_objects"))
{
LOG(LogError) << "GL Extensions not supported. GL_ARB_shader_objects";
return false;
}
First query I’ve: it my assumption right in that I would like to vary profiles to entry OpenGL 2.1 extensions?
Second query: What else can I do to assist troubleshoot this subject?
[ad_2]