diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-07 17:04:56 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-07 17:04:56 +0100 |
| commit | bd939acdf750181ef0e1a612b445da4c15077c85 (patch) | |
| tree | 028401c762b0436d9a5de1aa656ab35ba6445674 /src/gpu/effects/hybrid_3d_effect.cc | |
| parent | f2963ac821a3af1c54002ba13944552166956d04 (diff) | |
refactor: Bundle GPU context into GpuContext struct
- Created GpuContext struct {device, queue, format}
- Updated Effect/PostProcessEffect to take const GpuContext&
- Updated all 19 effect implementations
- Updated MainSequence.init() and LoadTimeline() signatures
- Updated generated timeline files
- Updated all test files
- Added gpu_get_context() accessor and fixture.ctx() helper
Fixes test_mesh.cc compilation error from g_device/g_queue/g_format conflicts.
All targets build successfully.
Diffstat (limited to 'src/gpu/effects/hybrid_3d_effect.cc')
| -rw-r--r-- | src/gpu/effects/hybrid_3d_effect.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gpu/effects/hybrid_3d_effect.cc b/src/gpu/effects/hybrid_3d_effect.cc index 8c70c07..6f89bf3 100644 --- a/src/gpu/effects/hybrid_3d_effect.cc +++ b/src/gpu/effects/hybrid_3d_effect.cc @@ -8,10 +8,8 @@ #include <cmath> #include <iostream> -Hybrid3DEffect::Hybrid3DEffect(WGPUDevice device, WGPUQueue queue, - WGPUTextureFormat format) - : Effect(device, queue) { - (void)format; // Passed to base, not directly used here. +Hybrid3DEffect::Hybrid3DEffect(const GpuContext& ctx) + : Effect(ctx) { } void Hybrid3DEffect::resize(int width, int height) { @@ -23,10 +21,10 @@ void Hybrid3DEffect::resize(int width, int height) { void Hybrid3DEffect::init(MainSequence* demo) { (void)demo; WGPUTextureFormat format = - demo->format; // Get current format from MainSequence (might be different - // than constructor if resized) + demo->gpu_ctx.format; // Get current format from MainSequence (might be different + // than constructor if resized) - renderer_.init(device_, queue_, format); + renderer_.init(device_, queue_, format_); renderer_.resize(width_, height_); // Texture Manager |
