365 {
366 try {
368 const bool usingDefaultModel = args.
filename.empty();
369 std::string filename = args.
filename;
371 filename = args.
path +
"/data/pyramid.obj";
372 }
374 filename,
375 usingDefaultModel,
381 "MXVK Model Example",
390 window.loop();
392 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
393 return EXIT_FAILURE;
395 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
396 return EXIT_FAILURE;
397 }
398
399 return EXIT_SUCCESS;
400}
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.
std::string font_path
Optional font file path (--font-path).
bool fullscreen
Whether fullscreen mode was requested.
bool enable_vsync
Enable FIFO present mode / v-sync (--enable-vsync).
std::string texture
Optional texture file path (--texture).
int height
Viewport height in pixels (default: 720).
std::string color
Optional rain RGB tint (--color).
std::string resource_path
Resource path.
std::string filename
Optional input filename (--filename).
std::string path
Asset root; proc_args() defaults it to the executable directory.
std::string fragmentPath
Optional fragment shader SPV path (--fragment).
int width
Viewport width in pixels (default: 1280).
std::string resource
Resource file.
int font_size
Matrix rain font size in pixels (--font-size).
bool binary
Use binary glyphs only (--binary).