载入中...
搜索中...
未找到
RenderControl.h
浏览该文件的文档.
1#pragma once
2
3#include "graphics/GBuffer.h"
4
5#include <string>
6#include <unordered_map>
7#include <vector>
8
9namespace eve::graphics {
10
11class Graphics;
12
44public:
46 ~RenderControl() = default;
47
48 RenderControl(const RenderControl &) = delete;
50
51 void attach(Graphics *gfx);
52 Graphics *getGraphics() const { return gfx_; }
53
54 bool supports(const std::string &feature) const;
55 void enable(const std::string &feature);
56 void disable(const std::string &feature);
57 bool isEnabled(const std::string &feature) const;
58
60 void compile();
61 bool isCompiled() const { return compiled_ && !dirty_; }
62 bool isDirty() const { return dirty_; }
63
64 int getPassCount() const { return int(passes_.size()); }
66 std::string getPassName(int index) const;
67 bool hasPass(const std::string &name) const;
68
69 GBuffer *getGBuffer() { return &gbuffer_; }
70 const GBuffer *getGBuffer() const { return &gbuffer_; }
71
73 void ensureCompiled();
74
75private:
76 void setFeature(const std::string &feature, bool enabled);
77
78 Graphics *gfx_ = nullptr;
79 std::unordered_map<std::string, bool> features_;
80 std::vector<std::string> passes_;
81 GBuffer gbuffer_;
82 bool dirty_ = true;
83 bool compiled_ = false;
84};
85
86} // namespace eve::graphics
const char * name
Definition RockMesh.cpp:21
bool enabled
Screen-space buffers for mid/post effects (AO, fog, stylize outline, …).
Definition GBuffer.h:24
Declarative, compilable 3D render control.
void ensureCompiled()
Ensure compiled; no-op when already clean.
void compile()
Rebuild the executable pass list from current feature flags.
Graphics * getGraphics() const
void enable(const std::string &feature)
RenderControl & operator=(const RenderControl &)=delete
void disable(const std::string &feature)
bool isEnabled(const std::string &feature) const
bool hasPass(const std::string &name) const
std::string getPassName(int index) const
Pass names: "shadow" | "gbuffer" | "forward" | "hair"
RenderControl(const RenderControl &)=delete
bool supports(const std::string &feature) const
const GBuffer * getGBuffer() const
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6