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_exception.hpp"
#include "mxvk/mxvk_math.h"
#include "mxvk/mxvk_png.hpp"
#include <SDL3/SDL.h>
#include <algorithm>
#include <array>
#include <cstdint>
#include <cstdlib>
#include <filesystem>
#include <format>
#include <iostream>
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  anonymous_namespace{main.cpp}::FaceDraw
class  example::Math3DTextureArrayWindow
class  anonymous_namespace{main.cpp}::SurfaceDeleter
struct  anonymous_namespace{main.cpp}::Texture
struct  anonymous_namespace{main.cpp}::TexVertex

Namespaces

namespace  anonymous_namespace{main.cpp}
namespace  example

Functions

SurfacePtr anonymous_namespace{main.cpp}::create_frame_surface (int width, int height)
Texture anonymous_namespace{main.cpp}::load_texture (const std::string &path)
int main (int argc, char **argv)
std::string anonymous_namespace{main.cpp}::resolve_texture_path (const Arguments &args)

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 428 of file main.cpp.

428 {
429 try {
430 Arguments args = proc_args(argc, argv);
431 example::Math3DTextureArrayWindow window(args, "MXVK 3D Math Texture Array");
432 window.loop();
433 } catch (mxvk::Exception &e) {
434 std::cerr << std::format("mxvk: Exception: {}\n", e.text());
435 return EXIT_FAILURE;
436 } catch (ArgException<std::string> &e) {
437 std::cerr << std::format("mxvk: Argument Exception: {}\n", e.text());
438 return EXIT_FAILURE;
439 }
440 return EXIT_SUCCESS;
441}
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
Plain data structure returned by proc_args() with all common libmx2 CLI options.
Definition argz.hpp:730