1424 {
1425 try {
1427 std::string filename = args.
filename;
1428 if (filename.empty()) {
1429 filename = args.
path +
"/data/starship.obj";
1430 }
1432 window.loop();
1434 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
1435 return EXIT_FAILURE;
1437 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
1438 return EXIT_FAILURE;
1439 }
1440
1441 return EXIT_SUCCESS;
1442}
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).