MXVK Vulkan Framework 0.24.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 2355 of file main.cpp.

2355 {
2356 std::srand(static_cast<unsigned>(std::time(nullptr)));
2357
2358 try {
2359 Arguments args = proc_args(argc, argv);
2360 if (args.path == ".") {
2362 }
2363
2364 ComputeWindow window(args);
2365 window.loop();
2366 } catch (const mxvk::Exception &e) {
2367 std::cerr << "mxvk: Exception: " << e.text() << "\n";
2368 return EXIT_FAILURE;
2369 } catch (const ArgException<std::string> &e) {
2370 std::cerr << std::format("mxvk: Argument Exception: {}\n", e.text());
2371 return EXIT_FAILURE;
2372 }
2373
2374 return EXIT_SUCCESS;
2375}
Arguments proc_args(int &argc, char **argv)
Parse standard libmx2 command-line options from main()'s argv.
Definition argz.hpp:872
Exception thrown by Argz::proc() on unrecognised or malformed options.
Definition argz.hpp:178
String text() const
Definition argz.hpp:182
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:730
std::string path
Asset root; proc_args() defaults it to the executable directory.
Definition argz.hpp:735