1336 {
1337 try {
1339 std::string filename = args.
filename;
1340 if (filename.empty()) {
1341 filename = args.
path +
"/data/starship.obj";
1342 }
1344 window.loop();
1346 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
1347 return EXIT_FAILURE;
1349 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
1350 return EXIT_FAILURE;
1351 }
1352
1353 return EXIT_SUCCESS;
1354}
Arguments proc_args(int &argc, char **argv)
Parse standard libmx2 command-line options from main()'s argv.
Exception thrown by Argz::proc() on unrecognised or malformed options.
Plain data structure returned by proc_args() with all common libmx2 CLI options.
bool fullscreen
Whether fullscreen mode was requested.
bool enable_vsync
Enable FIFO present mode / v-sync (--enable-vsync).
int height
Viewport height in pixels (default: 720).
std::string filename
Optional input filename (--filename).
std::string path
Asset root; proc_args() defaults it to the executable directory.
int width
Viewport width in pixels (default: 1280).