FCT
载入中...
搜索中...
未找到
RenderGraph_EnablePassClear.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/8/10.
3//
4
5#ifndef RENDERGRAPHENABLEPASSCLEAR_H
6#define RENDERGRAPHENABLEPASSCLEAR_H
7namespace FCT {
9 {
10 ClearTypes types;
12 float depth;
13 uint8_t stencil;
14 EnablePassClear() noexcept : types(0), color(0.0f, 0.0f, 0.0f, 1.0f), depth(1.0f), stencil(0) {}
15 template<typename... Args>
16 constexpr EnablePassClear(Args&&... args) noexcept : types(0), color(0.0f, 0.0f, 0.0f, 1.0f), depth(1.0f), stencil(0)
17 {
18 processArgs(std::forward<Args>(args)...);
19 }
20 template<typename... Rest>
21 constexpr void processArgs(const ClearTypes& other, Rest&&... rest)
22 {
23 types = other;
24 processArgs(std::forward<Rest>(rest)...);
25 }
26 template<typename... Rest>
27 constexpr void processArgs(const Vec4& other, Rest&&... rest)
28 {
29 color = other;
30 processArgs(std::forward<Rest>(rest)...);
31 }
32 template<typename... Rest>
33 constexpr void processArgs(const float& other, Rest&&... rest)
34 {
35 depth = other;
36 processArgs(std::forward<Rest>(rest)...);
37 }
38 template<typename... Rest>
39 constexpr void processArgs(const uint8_t& other, Rest&&... rest)
40 {
41 stencil = other;
42 processArgs(std::forward<Rest>(rest)...);
43 }
44 constexpr void processArgs() noexcept {}
45 };
46}
47#endif //RENDERGRAPHENABLEPASSCLEAR_H
constexpr void processArgs(const float &other, Rest &&... rest)
constexpr void processArgs(const Vec4 &other, Rest &&... rest)
constexpr void processArgs(const uint8_t &other, Rest &&... rest)
constexpr void processArgs(const ClearTypes &other, Rest &&... rest)
constexpr void processArgs() noexcept
constexpr EnablePassClear(Args &&... args) noexcept