载入中...
搜索中...
未找到
StylePass.h
浏览该文件的文档.
1#pragma once
2
3#include <string>
4
5namespace eve::graphics {
6class Canvas;
7class Graphics;
8class Shader;
9class Texture;
10} // namespace eve::graphics
11
12namespace eve::stylize {
13
22class StylePass {
23public:
24 StylePass(const std::string &style, graphics::Shader *shader);
25 ~StylePass() = default;
26
27 StylePass(const StylePass &) = delete;
28 StylePass &operator=(const StylePass &) = delete;
29
30 std::string getStyle() const { return style_; }
31 graphics::Shader *getShader() const { return shader_; }
32
33 bool hasParam(const std::string &name) const;
34 void setFloat(const std::string &name, float value);
35 float getFloat(const std::string &name) const;
36
38 void setTime(float seconds);
39 float getTime() const;
40
45 void apply(graphics::Graphics *gfx, graphics::Texture *source);
47
54
55private:
56 void uploadScreenUniforms(int width, int height);
57
58 std::string style_;
59 graphics::Shader *shader_ = nullptr; // owned by Graphics
60};
61
62} // namespace eve::stylize
std::string value
float height
Definition Grass.cpp:235
int width
Shader * shader
const char * name
Definition RockMesh.cpp:21
Custom GPU program.
Definition Shader.h:30
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:17
One stylized post-process pass bound to a style id (built-in or custom label). Draws a full-quad of t...
Definition StylePass.h:22
void applyCanvasTo(graphics::Graphics *gfx, graphics::Canvas *source, graphics::Canvas *dest)
Definition StylePass.cpp:95
bool hasParam(const std::string &name) const
Definition StylePass.cpp:18
float getFloat(const std::string &name) const
Definition StylePass.cpp:27
void setFloat(const std::string &name, float value)
Definition StylePass.cpp:22
StylePass(const StylePass &)=delete
void applyTo(graphics::Graphics *gfx, graphics::Texture *source, graphics::Canvas *dest)
Apply into an explicit destination canvas (restores previous canvas bind). Preferred hook for chains ...
Definition StylePass.cpp:85
std::string getStyle() const
Definition StylePass.h:30
void applyCanvas(graphics::Graphics *gfx, graphics::Canvas *source)
Definition StylePass.cpp:78
StylePass & operator=(const StylePass &)=delete
graphics::Shader * getShader() const
Definition StylePass.h:31
void apply(graphics::Graphics *gfx, graphics::Texture *source)
Apply style into the currently bound canvas / screen. Automatically uploads texel size + screen size ...
Definition StylePass.cpp:53
void setTime(float seconds)
Advance time-driven knobs (watercolor warp / ink jitter).
Definition StylePass.cpp:35
float getTime() const
Definition StylePass.cpp:39
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6