Browse Source

Platform: fixed Sdl2Application::tryCreateContext().

It seems that the context is negotiated when creating the window, thus
it fails there and not later when actually creating the context.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
ef0efecc9c
  1. 6
      src/Platform/Sdl2Application.cpp

6
src/Platform/Sdl2Application.cpp

@ -93,10 +93,8 @@ bool Sdl2Application::tryCreateContext(Configuration* configuration) {
if(!(window = SDL_CreateWindow(configuration->title().c_str(),
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
configuration->size().x(), configuration->size().y(),
SDL_WINDOW_OPENGL|flags))) {
Error() << "Platform::Sdl2Application::tryCreateContext(): cannot create window:" << SDL_GetError();
std::exit(2);
}
SDL_WINDOW_OPENGL|flags)))
return false;
if(!(context = SDL_GL_CreateContext(window))) {
SDL_DestroyWindow(window);

Loading…
Cancel
Save