|
|
|
|
@ -470,7 +470,10 @@ bool Sdl2Application::tryCreate(const Configuration& configuration) {
|
|
|
|
|
|
|
|
|
|
#ifdef MAGNUM_TARGET_GL |
|
|
|
|
bool Sdl2Application::tryCreate(const Configuration& configuration, const GLConfiguration& glConfiguration) { |
|
|
|
|
CORRADE_ASSERT(_context->version() == GL::Version::None, "Platform::Sdl2Application::tryCreate(): context already created", false); |
|
|
|
|
CORRADE_ASSERT(!(configuration.windowFlags() & Configuration::WindowFlag::Contextless), |
|
|
|
|
"Platform::Sdl2Application::tryCreate(): cannot pass Configuration::WindowFlag::Contextless when creating an OpenGL context", false); |
|
|
|
|
CORRADE_ASSERT(_context->version() == GL::Version::None, |
|
|
|
|
"Platform::Sdl2Application::tryCreate(): context already created", false); |
|
|
|
|
|
|
|
|
|
/* Enable double buffering, set up buffer sizes */ |
|
|
|
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); |
|
|
|
|
@ -621,7 +624,7 @@ bool Sdl2Application::tryCreate(const Configuration& configuration, const GLConf
|
|
|
|
|
if(!(_window = SDL_CreateWindow(configuration.title().data(), |
|
|
|
|
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, |
|
|
|
|
scaledWindowSize.x(), scaledWindowSize.y(), |
|
|
|
|
SDL_WINDOW_OPENGL|SDL_WINDOW_HIDDEN|SDL_WINDOW_ALLOW_HIGHDPI|Uint32(configuration.windowFlags()&~Configuration::WindowFlag::Contextless)))) |
|
|
|
|
SDL_WINDOW_OPENGL|SDL_WINDOW_HIDDEN|SDL_WINDOW_ALLOW_HIGHDPI|Uint32(configuration.windowFlags())))) |
|
|
|
|
{ |
|
|
|
|
Error() << "Platform::Sdl2Application::tryCreate(): cannot create window:" << SDL_GetError(); |
|
|
|
|
return false; |
|
|
|
|
|