1056 {
1057 try {
1061 framebuffer = {320, 180};
1062 std::cout <<
APP_NAME <<
": benchmark framebuffer defaults to 320x180; use --framebuffer to override\n";
1063 }
1064 example::Math3DModelLoaderWindow window(args.
filename, args.
texture, args.
path, std::string(
WINDOW_TITLE), args.
width, args.
height, args.
fullscreen, args.
enable_vsync, args.
repeat, args.
nowarpfix, args.
disable_mipmap, args.
mip_bias, framebuffer, args.
benchmark, args.
wireframe);
1065 window.loop();
1067 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
1068 return EXIT_FAILURE;
1070 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
1071 return EXIT_FAILURE;
1072 }
1073 return EXIT_SUCCESS;
1074}
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.
constexpr std::string_view WINDOW_TITLE
constexpr std::string_view APP_NAME
Plain data structure returned by proc_args() with all common libmx2 CLI options.
FramebufferDimensions framebuffer
Software framebuffer size requested by --framebuffer.
bool framebufferSpecified
Whether --framebuffer was provided.
bool fullscreen
Whether fullscreen mode was requested.
float mip_bias
Mipmap level-of-detail bias requested by --mip-bias.
bool enable_vsync
Enable FIFO present mode / v-sync (--enable-vsync).
bool nowarpfix
Disable perspective-correct texture mapping (--nowarpfix).
std::string texture
Optional texture file path (--texture).
int height
Viewport height in pixels (default: 720).
bool repeat
Enable repeat behavior such as playback looping or wrapped textures.
std::string filename
Optional input filename (--filename).
std::string path
Asset root; proc_args() defaults it to the executable directory.
bool benchmark
Enable application benchmark mode (--benchmark).
bool wireframe
Render supported 3D models as wireframes (--wireframe).
int width
Viewport width in pixels (default: 1280).
bool disable_mipmap
Disable mipmap generation and selection (--disable-mipmap).
Parsed software framebuffer dimensions.