MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
fractal.cpp File Reference
#include "mxvk/argz.hpp"
#include "mxvk/mxvk.hpp"
#include "mxvk/mxvk_exception.hpp"
#include <SDL3/SDL.h>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <algorithm>
#include <array>
#include <chrono>
#include <cmath>
#include <condition_variable>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <filesystem>
#include <format>
#include <iostream>
#include <mutex>
#include <queue>
#include <string>
#include <system_error>
#include <thread>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  example::FractalWindow

Namespaces

namespace  example

Macros

#define fractal_zoom_ASSET_DIR   "."

Functions

int main (int argc, char **argv)

Macro Definition Documentation

◆ fractal_zoom_ASSET_DIR

#define fractal_zoom_ASSET_DIR   "."

Definition at line 33 of file fractal.cpp.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 1536 of file fractal.cpp.

1536 {
1537 try {
1538 const Arguments args = proc_args(argc, argv);
1539 example::FractalWindow window(args.path, args.width, args.height, args.fullscreen, args.enable_vsync);
1540 window.loop();
1541 } catch (mxvk::Exception &e) {
1542 std::cerr << std::format("mxvk: Exception: {}\n", e.text());
1543 return EXIT_FAILURE;
1544 } catch (ArgException<std::string> &e) {
1545 std::cerr << std::format("mxvk: Argument Exception: {}\n", e.text());
1546 return EXIT_FAILURE;
1547 }
1548 return EXIT_SUCCESS;
1549}
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
Plain data structure returned by proc_args() with all common libmx2 CLI options.
Definition argz.hpp:718
bool fullscreen
Whether fullscreen mode was requested.
Definition argz.hpp:724
bool enable_vsync
Enable FIFO present mode / v-sync (--enable-vsync).
Definition argz.hpp:738
int height
Viewport height in pixels (default: 720).
Definition argz.hpp:721
std::string path
Asset root; proc_args() defaults it to the executable directory.
Definition argz.hpp:723
int width
Viewport width in pixels (default: 1280).
Definition argz.hpp:720