summaryrefslogtreecommitdiff
path: root/src/gpu/effect.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-31 17:23:13 +0100
committerskal <pascal.massimino@gmail.com>2026-01-31 17:23:13 +0100
commit32d26371627638570b74d678ab73deb7b87af8e4 (patch)
tree3097b3678086ddaed7930a02e5c88464f1c7d03e /src/gpu/effect.h
parent7ec28a3f1d417cd5b5adead895a25e42035ef037 (diff)
fix: Cross-compilation and style compliance
Fixes seq_compiler build for Windows cross-compilation. Moves common WebGPU compatibility shims to gpu.h. Applies project-wide coding style via clang-format. Verified on both macOS (native) and Windows (cross-compile).
Diffstat (limited to 'src/gpu/effect.h')
-rw-r--r--src/gpu/effect.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gpu/effect.h b/src/gpu/effect.h
index 5f49041..ba569c2 100644
--- a/src/gpu/effect.h
+++ b/src/gpu/effect.h
@@ -22,10 +22,13 @@ public:
virtual ~Effect() = default;
// One-time setup (load assets, create buffers).
- virtual void init(MainSequence *demo) { (void)demo; }
+ virtual void init(MainSequence *demo) {
+ (void)demo;
+ }
// Called when the effect starts playing in a sequence segment.
- virtual void start() {}
+ virtual void start() {
+ }
// Dispatch compute shaders.
virtual void compute(WGPUCommandEncoder encoder, float time, float beat,
@@ -42,19 +45,25 @@ public:
float intensity, float aspect_ratio) = 0;
// Called when the effect finishes in a sequence segment.
- virtual void end() {}
+ virtual void end() {
+ }
bool is_initialized = false;
- virtual bool is_post_process() const { return false; }
+ virtual bool is_post_process() const {
+ return false;
+ }
};
// Base class for all post-processing effects
class PostProcessEffect : public Effect {
public:
- bool is_post_process() const override { return true; }
+ bool is_post_process() const override {
+ return true;
+ }
// Post-process effects don't have a compute phase by default
- void compute(WGPUCommandEncoder, float, float, float, float) override {}
+ void compute(WGPUCommandEncoder, float, float, float, float) override {
+ }
// Fullscreen quad render
void render(WGPURenderPassEncoder pass, float time, float beat,