#include "mxvk/argz.hpp"
#include "mxvk/mxvk.hpp"
#include "mxvk/mxvk_exception.hpp"
#include "mxvk/mxvk_stencil.hpp"
#include <chrono>
#include <cstdlib>
#include <format>
#include <iostream>
#include <memory>
#include <string>
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 98 of file stencil.cpp.
98 {
99 try {
102 window.loop();
104 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
105 return EXIT_FAILURE;
107 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
108 return EXIT_FAILURE;
109 }
110 return EXIT_SUCCESS;
111}
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 path
Asset root; proc_args() defaults it to the executable directory.
int width
Viewport width in pixels (default: 1280).