Is it true that opengl 3.3 is not supported in SFML 2? I seem unable to set
sf::ContextSettings.minorVersion to 3, as that is what I believe would enable me to use glsl version 330.
I was following along in a tutorial, and when I tried to create a shader the program gave some error about NEW_IDENTIFIER, which after googling it seems I was using an outdated version of glsl, so I tried using context settings to get the required version.
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 69
Current serial number in output stream: 68
So I thought maybe I simply have an installed version that is outdated.
[morran@5586577d ~]$ glxinfo
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD CAYMAN
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.5
OpenGL core profile shading language version string: 3.30
My system clearly supports glsl version 330, so why does it seem like SFML doesn't do so too?
What steps can I take to enable opengl 3.3 in SFML?
edit--Yeah it turns out I didn't understand the meaning of opengl core profile. So I guess my new question is, can I enable that somehow?
edit2--For example, in SDL I can do this:
SDL_Init(SDL_INIT_VIDEO);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_Window* window = SDL_CreateWindow("OpenGL", 100, 100, 800, 600, SDL_WINDOW_OPENGL);
SDL_GLContext context = SDL_GL_CreateContext(window);
char* version = (char*)glGetString(GL_VERSION);
printf("%s\n", version);
And as far as I can tell from my brief testing, it works with no problems.
outputs
3.3 (Core Profile) Mesa 10.1.5