diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-09 11:39:54 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-09 11:39:54 +0100 |
| commit | d48aac685ecd47a80e0752011a1d78bc86094947 (patch) | |
| tree | 8b36b3c4a212e05aeae91c560346a73f0e7987b6 /src/gpu/effect.h | |
| parent | fd19130b3360d17b44247ec26533b20e051b7f8c (diff) | |
Refactor Effect class to centralize common uniforms management
Moved to Effect base class. Updated all subclasses to use the base member, removing redundant declarations and initializations. Cleaned up by removing redundant class definitions and including specific headers. Fixed a typo in DistortEffect constructor.
Diffstat (limited to 'src/gpu/effect.h')
| -rw-r--r-- | src/gpu/effect.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/effect.h b/src/gpu/effect.h index 6fdb0f4..8f35f3c 100644 --- a/src/gpu/effect.h +++ b/src/gpu/effect.h @@ -1,5 +1,7 @@ #pragma once #include "gpu/gpu.h" +#include "gpu/effects/post_process_helper.h" +#include "gpu/uniform_helper.h" #include <algorithm> #include <map> #include <memory> @@ -12,6 +14,7 @@ class PostProcessEffect; class Effect { public: Effect(const GpuContext& ctx) : ctx_(ctx) { + uniforms_.init(ctx.device); } virtual ~Effect() = default; virtual void init(MainSequence* demo) { @@ -43,7 +46,7 @@ class Effect { protected: const GpuContext& ctx_; - GpuBuffer uniforms_; + UniformBuffer<CommonPostProcessUniforms> uniforms_; int width_ = 1280; int height_ = 720; }; |
