Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
World3DShaderAssets.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <SDL3/SDL_gpu.h>
4
5#include <expected>
6#include <filesystem>
7#include <string>
8
9namespace monopoly::engine
10{
19
21 {
23 std::filesystem::path path;
24 std::string detail;
25 };
26
28 {
29 public:
30 World3DShaderSet() = default;
36
37 [[nodiscard]] static std::expected<World3DShaderSet,
39 SDL_GPUDevice* device,
40 const std::filesystem::path& shaderDirectory,
41 bool modernPBR = false);
42
44 { return vertex_; }
46 { return fragment_; }
48 { return format_; }
50 { return entrypoint_; }
51
52 void reset() noexcept;
53
54 private:
55 SDL_GPUDevice* device_{};
56 SDL_GPUShader* vertex_{};
57 SDL_GPUShader* fragment_{};
58 SDL_GPUShaderFormat format_{};
59 const char* entrypoint_{"main"};
60 };
61}
unsigned index
CardTag other
static std::expected< World3DShaderSet, World3DShaderError > load(SDL_GPUDevice *device, const std::filesystem::path &shaderDirectory, bool modernPBR=false)
SDL_GPUShaderFormat format() const noexcept
const char * entrypoint() const noexcept
World3DShaderSet & operator=(const World3DShaderSet &)=delete
World3DShaderSet(const World3DShaderSet &)=delete
SDL_GPUShader * vertex() const noexcept
SDL_GPUShader * fragment() const noexcept