MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
bluesky.cpp File Reference
#include "mxvk/argz.hpp"
#include "mxvk/mxvk.hpp"
#include "mxvk/mxvk_exception.hpp"
#include "mxvk/mxvk_resource.hpp"
#include <SDL3/SDL.h>
#include <algorithm>
#include <array>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <format>
#include <iostream>
#include <string>
#include <vector>
#include <glm/ext/matrix_clip_space.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <glm/glm.hpp>

Go to the source code of this file.

Classes

struct  anonymous_namespace{bluesky.cpp}::MeshData
struct  anonymous_namespace{bluesky.cpp}::MeshResources
struct  anonymous_namespace{bluesky.cpp}::PipelineResources
struct  anonymous_namespace{bluesky.cpp}::PushConstants
struct  anonymous_namespace{bluesky.cpp}::SceneVertex
class  example::WaterWindow

Namespaces

namespace  anonymous_namespace{bluesky.cpp}
namespace  example

Functions

void anonymous_namespace{bluesky.cpp}::check_vk (VkResult result, const std::string &message)
int main (int argc, char **argv)

Variables

constexpr float anonymous_namespace{bluesky.cpp}::SCENE_REFERENCE_ASPECT = 16.0f / 9.0f
constexpr int anonymous_namespace{bluesky.cpp}::WATER_GRID_RESOLUTION = 2048
constexpr float anonymous_namespace{bluesky.cpp}::WATER_SIZE = 320.0f

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 536 of file bluesky.cpp.

536 {
537 try {
538 const Arguments args = proc_args(argc, argv);
539 example::WaterWindow window(args.path, "MXVK - Bluesky", args.width, args.height, args.fullscreen, args.enable_vsync);
540 window.loop();
541 } catch (mxvk::Exception &e) {
542 std::cerr << std::format("mxvk: Exception: {}\n", e.text());
543 return EXIT_FAILURE;
544 } catch (ArgException<std::string> &e) {
545 std::cerr << std::format("mxvk: Argument Exception: {}\n", e.text());
546 return EXIT_FAILURE;
547 }
548 return EXIT_SUCCESS;
549}
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
bool fullscreen
Whether fullscreen mode was requested.
Definition argz.hpp:736
bool enable_vsync
Enable FIFO present mode / v-sync (--enable-vsync).
Definition argz.hpp:750
int height
Viewport height in pixels (default: 720).
Definition argz.hpp:733
std::string path
Asset root; proc_args() defaults it to the executable directory.
Definition argz.hpp:735
int width
Viewport width in pixels (default: 1280).
Definition argz.hpp:732