Results 1 to 4 of 4

Thread: OpenGL 3.2 Context in SDL

  1. #1
    Member Newbie
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    44

    OpenGL 3.2 Context in SDL

    Hi guys,
    anyone have implemented, with succes, this tutorial ?
    Thanks!

    PS: Under Windows.

  2. #2
    Super Moderator Frequent Contributor imported_Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    937

    Re: OpenGL 3.2 Context in SDL

    Yes I did and I didn't notice anything specific to do but it works!
    [URL="http://www.g-truc.net"]G-Truc Creation[/URL] - [URL="http://glm.g-truc.net"]GLM[/URL] - [URL="http://samples.g-truc.net/"]OpenGL Samples Pack[/URL] - [URL="http://www.openglinsights.com"]OpenGL Insights[/URL]

  3. #3
    Super Moderator Frequent Contributor imported_Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    937

    Re: OpenGL 3.2 Context in SDL

    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.
    [URL="http://www.g-truc.net"]G-Truc Creation[/URL] - [URL="http://glm.g-truc.net"]GLM[/URL] - [URL="http://samples.g-truc.net/"]OpenGL Samples Pack[/URL] - [URL="http://www.openglinsights.com"]OpenGL Insights[/URL]

  4. #4
    Member Newbie
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    44

    Re: OpenGL 3.2 Context in SDL

    Thanks for the replies!
    The main problem is during the linking process, linking error on this functions (the only two OpenGL functions):
    Code :
    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.

Similar Threads

  1. Replies: 2
    Last Post: 07-23-2018, 10:14 PM
  2. Replies: 1
    Last Post: 06-22-2013, 09:31 PM
  3. Replies: 9
    Last Post: 12-31-2012, 04:20 PM
  4. Replies: 2
    Last Post: 04-26-2010, 09:38 PM
  5. Replies: 1
    Last Post: 06-26-2003, 12:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean