summaryrefslogtreecommitdiff
path: root/src/effects/heptagon_effect.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-17 12:51:29 +0100
committerskal <pascal.massimino@gmail.com>2026-02-17 12:51:29 +0100
commit2e2e01048da5c466102bb57d64148aff72f4a558 (patch)
treee88b5750395873ac9911fc4b7961f8558cc213fc /src/effects/heptagon_effect.h
parentb3eded8d56219fa19029a1b9bb7e7e7584f093d9 (diff)
refactor(gpu): Add RAII wrapper for WGPU resources to eliminate manual cleanup
Introduces WGPUResource template with automatic release on destruction. Reduces boilerplate in effect destructors and prevents resource leaks. - set() for one-time initialization - replace() for per-frame recreation - Field ordering documented for dependency management Converted 3 effects (Heptagon, Flash, Passthrough) and Effect base class. All tests pass (34/34). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/effects/heptagon_effect.h')
-rw-r--r--src/effects/heptagon_effect.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/effects/heptagon_effect.h b/src/effects/heptagon_effect.h
index 4b7b887..4563e47 100644
--- a/src/effects/heptagon_effect.h
+++ b/src/effects/heptagon_effect.h
@@ -4,18 +4,18 @@
#include "gpu/effect.h"
#include "gpu/uniform_helper.h"
+#include "gpu/wgpu_resource.h"
class Heptagon : public Effect {
public:
Heptagon(const GpuContext& ctx, const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs, float start_time,
float end_time);
- ~Heptagon();
void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params,
NodeRegistry& nodes) override;
private:
- WGPURenderPipeline pipeline_;
- WGPUBindGroup bind_group_;
+ RenderPipeline pipeline_;
+ BindGroup bind_group_;
};