FCT
载入中...
搜索中...
未找到
RenderGraph_Texture.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/8/10.
3//
4
5#ifndef RENDERGRAPH_TEXTURE_H
6#define RENDERGRAPH_TEXTURE_H
7namespace FCT
8{
9 struct Texture
10 {
11 std::string name;
14 ShaderStages stages;
16
17 Texture() noexcept : size(TextureSize::FullSize()) {}
18
19 template<typename... Args>
20 Texture(std::string_view name, Args&&... args) noexcept
23 processArgs(std::forward<Args>(args)...);
24 }
25
26 template<typename... Rest>
27 constexpr void processArgs(const Samples& other, Rest&&... rest) noexcept {
28 samples = other;
29 processArgs(std::forward<Rest>(rest)...);
30 }
31
32 template<typename... Rest>
33 constexpr void processArgs(const Format& other, Rest&&... rest) noexcept {
34 format = other;
35 processArgs(std::forward<Rest>(rest)...);
36 }
37
38 template<typename... Rest>
39 constexpr void processArgs(const ShaderStages& other, Rest&&... rest) noexcept {
40 stages = other;
41 processArgs(std::forward<Rest>(rest)...);
42 }
43
44 template<typename... Rest>
45 constexpr void processArgs(const TextureSize& other, Rest&&... rest) noexcept {
46 size = other;
47 processArgs(std::forward<Rest>(rest)...);
48 }
49
50 template<typename... Rest>
51 constexpr void processArgs(uint32_t width, uint32_t height, Rest&&... rest) noexcept {
52 size = TextureSize::Absolute(width, height);
53 processArgs(std::forward<Rest>(rest)...);
54 }
55
56 constexpr void processArgs() noexcept {}
57 };
58}
59#endif //RENDERGRAPH_TEXTURE_H
Texture(std::string_view name, Args &&... args) noexcept
constexpr void processArgs(uint32_t width, uint32_t height, Rest &&... rest) noexcept
constexpr void processArgs(const ShaderStages &other, Rest &&... rest) noexcept
constexpr void processArgs(const Format &other, Rest &&... rest) noexcept
constexpr void processArgs(const Samples &other, Rest &&... rest) noexcept
constexpr void processArgs() noexcept
constexpr void processArgs(const TextureSize &other, Rest &&... rest) noexcept