Browse Source

Platform: fix {Sdl2,Glfw}Application startup on GL-less builds.

pull/368/head
Vladimír Vondruš 7 years ago
parent
commit
a61e258d88
  1. 6
      src/Magnum/Platform/GlfwApplication.cpp
  2. 6
      src/Magnum/Platform/Sdl2Application.cpp

6
src/Magnum/Platform/GlfwApplication.cpp

@ -67,7 +67,11 @@ GlfwApplication::GlfwApplication(const Arguments& arguments, NoCreateT):
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
_context.reset(new GLContext{NoCreate, args, arguments.argc, arguments.argv}); _context.reset(new GLContext{NoCreate, args, arguments.argc, arguments.argv});
#else #else
args.parse(arguments.argc, arguments.argv); /** @todo this is duplicated here and in Sdl2Application, figure out a nice
non-duplicated way to handle this */
args.addOption("log", "default").setHelp("log", "console logging", "default|quiet|verbose")
.setFromEnvironment("log")
.parse(arguments.argc, arguments.argv);
#endif #endif
/* Init GLFW */ /* Init GLFW */

6
src/Magnum/Platform/Sdl2Application.cpp

@ -91,7 +91,11 @@ Sdl2Application::Sdl2Application(const Arguments& arguments, NoCreateT):
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
_context.reset(new GLContext{NoCreate, args, arguments.argc, arguments.argv}); _context.reset(new GLContext{NoCreate, args, arguments.argc, arguments.argv});
#else #else
args.parse(arguments.argc, arguments.argv); /** @todo this is duplicated here and in Sdl2Application, figure out a nice
non-duplicated way to handle this */
args.addOption("log", "default").setHelp("log", "console logging", "default|quiet|verbose")
.setFromEnvironment("log")
.parse(arguments.argc, arguments.argv);
#endif #endif
/* Available since 2.0.4, disables interception of SIGINT and SIGTERM so /* Available since 2.0.4, disables interception of SIGINT and SIGTERM so

Loading…
Cancel
Save