PDA

View Full Version : OpenGL 3.2 Context in SDL



enigmagame
10-05-2009, 06:38 AM
Hi guys,
anyone have implemented, with succes, this tutorial (http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Co ntext_in_SDL_(C_/_SDL)) ?
Thanks!

PS: Under Windows.

Groovounet
10-05-2009, 07:16 AM
Yes I did and I didn't notice anything specific to do but it works!

Groovounet
10-05-2009, 07:20 AM
You don't even need this:

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);

Because SDL will create a OpenGL context with the lastest version available. Btw if you use version 3.2, it will probably fail because no implementation are yet 3.2 but 3.1, nVidia included. A third release of the nVidia drivers for OpenGL 3.2 is available and it seams pretty close to final.

enigmagame
10-05-2009, 07:45 AM
Thanks for the replies!
The main problem is during the linking process, linking error on this functions (the only two OpenGL functions):


glClearColor ( 1.0, 0.0, 0.0, 1.0 );
glClear ( GL_COLOR_BUFFER_BIT );

But, for me, all dependencies are correctly configured, because another (old) project, made with GLUT, compile without problems.