diff options
Diffstat (limited to 'src/gpu/effect.h')
| -rw-r--r-- | src/gpu/effect.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gpu/effect.h b/src/gpu/effect.h index e7453c7..7e5e2ce 100644 --- a/src/gpu/effect.h +++ b/src/gpu/effect.h @@ -33,7 +33,10 @@ class Effect { } virtual void render(WGPURenderPassEncoder pass, float time, float beat, float intensity, float aspect_ratio) = 0; - virtual void resize(int width, int height) {} + virtual void resize(int width, int height) { + width_ = width; + height_ = height; + } virtual void end() { } @@ -46,6 +49,8 @@ class Effect { WGPUDevice device_; WGPUQueue queue_; GpuBuffer uniforms_; + int width_ = 1280; + int height_ = 720; }; class PostProcessEffect : public Effect { @@ -123,6 +128,9 @@ class MainSequence { }; std::vector<ActiveSequence> sequences_; + int width_ = 1280; + int height_ = 720; + WGPUTexture framebuffer_a_ = nullptr; WGPUTextureView framebuffer_view_a_ = nullptr; WGPUTexture framebuffer_b_ = nullptr; |
