Hello,
Maybe this is a dumb question but I don't know ...
I am getting a new Dev system because my old one is dying but the reason I need my older system is because it has OpenGL 3.1
So essentially I need a way to make sure that applications I write will work on older contexts.
Is this simply a matter of setting a window hint/option within a library to request an older context to test against?
Or is there something else involved?
Thank you for your time.
Request for advice, testing older OpenGL contexts...
Yeah, thats the usual way to do it. How to do it differs from library to library ofcourse.
This is how it would look for SDL2 and has to be set before creating the OpenGL context:
SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 );
SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 1 );
Regards
Markus
Yeah, thats the usual way to do it. How to do it differs from library to library ofcourse.
This is how it would look for SDL2 and has to be set before creating the OpenGL context:RegardsSDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 ); SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 1 );
Markus
Cool; seems very simple. I use GLFW and QT and they are similarly easy to set up the context like how you are showing above with SDL.
Thank you.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement