From 32d26371627638570b74d678ab73deb7b87af8e4 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 17:23:13 +0100 Subject: 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). --- src/gpu/effect.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/gpu/effect.h') 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, -- cgit v1.2.3