I can not seem to figure out what I’m doing wrong in trying to get an OpenGL 3.3 context. It returns a 2.1 compatibility context. I’ve searched google and these forums for the past two days but since I’m new to SDL, OpenGL, and C++ I’m having a real hard time. Any help would be greatly appreciated.
I get the following output for the code below: “2.1 NVIDIA-8.24.9 310.40.25f01”
Need to set the SDL_GL_CONTEXT_PROFILE_MASK to SDL_GL_CONTEXT_PROFILE_CORE
The SDL_Renderer uses the older OpenGL and puts the driver into compatibility mode. Here is the minimal code to get a 3.3 OpenGL context using SDL. It doesn’t clean up after itself but this shows the steps required to get an OpenGL 3.3 context on 10.9/Mavericks. I also haven’t tried actually using any GL 3.3 calls. I suspect I may have to include OpenGL/gl3.h (for mac) instead of SDL_opengl.h. but the following code compiles and creates a 3.3 OpenGL context on my MacBook Pro retina.