Browse Source

Sdl2Application: don't request specific OpenGL version.

I don't want to ditch old Intels with GL 2.1 yet. Also now the version
reported in Context is really the highest supported version, which
optimizes extension presence checks a bit.
pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
757ca13514
  1. 4
      src/Platform/Sdl2Application.cpp
  2. 8
      src/Platform/Sdl2Application.h

4
src/Platform/Sdl2Application.cpp

@ -44,10 +44,6 @@ Sdl2Application::Sdl2Application(int, char**, const std::string& name, const Mat
exit(1);
}
/* Request OpenGL 3.2 */
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
/* Enable double buffering and 24bt depth buffer */
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);

8
src/Platform/Sdl2Application.h

@ -37,8 +37,9 @@ namespace Platform {
/** @nosubgrouping
@brief SDL2 application
Application using [Simple DirectMedia Layer](www.libsdl.org/). Supports
keyboard and mouse handling.
Application using [Simple DirectMedia Layer](www.libsdl.org/). Centered
non-resizable window with double-buffered OpenGL context and 24bit depth
buffer. Supports keyboard and mouse handling.
@section Sdl2Application-usage Usage
@ -65,9 +66,6 @@ class Sdl2Application {
* @param argv Arguments of `main()` function
* @param title Window title
* @param size Window size
*
* Creates centered non-resizable window with double-buffered
* OpenGL 3.2 context with 24bit depth buffer.
*/
Sdl2Application(int argc, char** argv, const std::string& title = "Magnum SDL2 application", const Math::Vector2<GLsizei>& size = Math::Vector2<GLsizei>(800, 600));

Loading…
Cancel
Save