I have tried setting the OpenGL context to v3.3 using the following code, it creates a 4.1 context.
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);
Am I doing something wrong or is it a mac problem?
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
, that is an obsolete flag used for OpenGL 3.0 and 3.1 only, it is irrelevant in 3.2 and onwards, and it didn't exist prior to 3.0. – Dietrich Epp#include <OpenGL/gl3.h>
, and any functions which aren't supported will just be NULL at runtime, just as if you had used GLEW. GLEW is unable to check for the presence of extensions in core contexts, so there is no point to using it on OS X unless it happens to make your cross-platform life easier. – Dietrich Epp