unsigned windowed = 0;
string windowed_size;
float seek_seconds = 0.0f;
+ bool legacy_gl = false;
GetOpt getopt;
getopt.add_option('f', "fullscreen", fullscreen_size, GetOpt::OPTIONAL_ARG).bind_seen_count(fullscreen).set_help("Start in fullscreen mode", "SIZE");
getopt.add_option("no-music", no_music, GetOpt::NO_ARG).set_help("Disable music playback");
getopt.add_option("fps", framerate, GetOpt::REQUIRED_ARG).set_help("Run at NUM fps", "NUM");
getopt.add_option("no-vsync", no_vsync, GetOpt::NO_ARG).set_help("Disable vertical sync");
+ getopt.add_option("legacy-gl", legacy_gl, GetOpt::NO_ARG).set_help("Use a legacy OpenGL context");
getopt(argc, argv);
if(fullscreen && windowed)
fullscreen_opts.fullscreen_monitor = desktop_mode.monitor;
fullscreen_opts.fullscreen_exclusive = false;
+ if(!legacy_gl)
+ {
+ gl_opts.gl_version_major = 3;
+ gl_opts.gl_version_minor = 2;
+ gl_opts.core_profile = true;
+ }
+
seek = seek_seconds*Time::sec;
}
LauncherBase::LauncherBase(int argc, char **argv):
options(display, argc, argv),
window(display, options.start_fullscreen>0 ? options.fullscreen_opts : options.win_opts),
- gl_context(window),
+ gl_context(window, options.gl_opts),
keyboard(window),
al_device(options.no_music ? 0 : new AL::Device),
al_context(options.no_music ? 0 : new AL::Context(*al_device)),