MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
mxvk_runtime_options.hpp
Go to the documentation of this file.
1#ifndef MXVK_RUNTIME_OPTIONS_HPP
2#define MXVK_RUNTIME_OPTIONS_HPP
3
4#include <string>
5
6namespace mxvk {
7 [[nodiscard]] inline bool &defaultEnableScreenshotStorage() {
8 static bool enabled = false;
9 return enabled;
10 }
11
12 inline void setDefaultEnableScreenshot(bool enabled) { defaultEnableScreenshotStorage() = enabled; }
13
14 [[nodiscard]] inline bool defaultEnableScreenshot() { return defaultEnableScreenshotStorage(); }
15
16 [[nodiscard]] inline std::string &defaultExecutableNameStorage() {
17 static std::string name = "mxvk";
18 return name;
19 }
20
21 inline void setDefaultExecutableName(const std::string &name) { defaultExecutableNameStorage() = name.empty() ? "mxvk" : name; }
22
23 [[nodiscard]] inline const std::string &defaultExecutableName() { return defaultExecutableNameStorage(); }
24
25 [[nodiscard]] inline std::string &defaultShaderDirectoryStorage() {
26 static std::string directory{};
27 return directory;
28 }
29
30 inline void setDefaultShaderDirectory(const std::string &directory) { defaultShaderDirectoryStorage() = directory; }
31
32 [[nodiscard]] inline const std::string &defaultShaderDirectory() { return defaultShaderDirectoryStorage(); }
33} // namespace mxvk
34
35#endif
Utilities for loading and saving PNG images.
Definition mxvk.hpp:31
void setDefaultShaderDirectory(const std::string &directory)
void setDefaultEnableScreenshot(bool enabled)
const std::string & defaultShaderDirectory()
bool defaultEnableScreenshot()
std::string & defaultShaderDirectoryStorage()
const std::string & defaultExecutableName()
std::string & defaultExecutableNameStorage()
void setDefaultExecutableName(const std::string &name)
bool & defaultEnableScreenshotStorage()