FCT
载入中...
搜索中...
未找到
RenderGraph_Target.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/8/10.
3//
4
5#ifndef RENDERGRAPH_TARGET_H
6#define RENDERGRAPH_TARGET_H
7namespace FCT
8{
9 struct Target
10 {
11 std::string name;
14 uint32_t width;
15 uint32_t height;
17
20
21 Target() noexcept
23 width(0), height(0), hasFixedSize(false), wnd(nullptr), isWindow(false) {}
24
25 template<typename... Args>
26 Target(std::string_view name, Args&&... args) noexcept
28 width(0), height(0), hasFixedSize(false), wnd(nullptr), isWindow(false) {
29 processArgs(std::forward<Args>(args)...);
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 Samples& other, Rest&&... rest) noexcept {
40 samples = other;
41 processArgs(std::forward<Rest>(rest)...);
42 }
43
44 template<typename... Rest>
45 constexpr void processArgs(Window* window, Rest&&... rest) noexcept {
46 wnd = window;
47 isWindow = true;
48 processArgs(std::forward<Rest>(rest)...);
49 }
50
51 template<typename... Rest>
52 constexpr void processArgs(uint32_t w, uint32_t h, Rest&&... rest) noexcept {
53 width = w;
54 height = h;
55 hasFixedSize = true;
56 processArgs(std::forward<Rest>(rest)...);
57 }
58
59 constexpr void processArgs() noexcept {}
60 };
61}
62#endif //RENDERGRAPH_TARGET_H
constexpr void processArgs(uint32_t w, uint32_t h, Rest &&... rest) noexcept
constexpr void processArgs(const Format &other, Rest &&... rest) noexcept
constexpr void processArgs(const Samples &other, Rest &&... rest) noexcept
constexpr void processArgs(Window *window, Rest &&... rest) noexcept
Target(std::string_view name, Args &&... args) noexcept
constexpr void processArgs() noexcept