MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
main.cpp File Reference
#include "mxvk/argz.hpp"
#include "mxvk/mxvk.hpp"
#include "mxvk/mxvk_cv.hpp"
#include "mxvk/mxvk_exception.hpp"
#include "mxvk/mxvk_shader_module.hpp"
#include "mxvk/mxvk_opencv_compat.hpp"
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <opencv2/opencv.hpp>
#include <string>
#include <string_view>
#include <thread>
#include <vector>

Go to the source code of this file.

Classes

struct  ComputePC
class  ComputeWindow

Macros

#define compute_shader_ASSET_DIR   "."

Functions

int main (int argc, char **argv)

Macro Definition Documentation

◆ compute_shader_ASSET_DIR

#define compute_shader_ASSET_DIR   "."

Definition at line 36 of file main.cpp.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 1985 of file main.cpp.

1985 {
1986 std::srand(static_cast<unsigned>(std::time(nullptr)));
1987
1988 try {
1989 Arguments args = proc_args(argc, argv);
1990 if (args.path == ".") {
1992 }
1993
1994 ComputeWindow window(args);
1995 window.loop();
1996 } catch (const mxvk::Exception &e) {
1997 std::cerr << "mxvk: Exception: " << e.text() << "\n";
1998 return EXIT_FAILURE;
1999 } catch (const ArgException<std::string> &e) {
2000 std::cerr << std::format("mxvk: Argument Exception: {}\n", e.text());
2001 return EXIT_FAILURE;
2002 }
2003
2004 return EXIT_SUCCESS;
2005}
Arguments proc_args(int &argc, char **argv)
Parse standard libmx2 command-line options from main()'s argv.
Definition argz.hpp:854
Exception thrown by Argz::proc() on unrecognised or malformed options.
Definition argz.hpp:169
String text() const
Definition argz.hpp:173
std::string text() const
#define compute_shader_ASSET_DIR
Definition main.cpp:36
Plain data structure returned by proc_args() with all common libmx2 CLI options.
Definition argz.hpp:718
std::string path
Asset root; proc_args() defaults it to the executable directory.
Definition argz.hpp:723