diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-31 15:36:45 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-31 15:36:45 +0100 |
| commit | 72c0cbcb38732b698d33d52459fed67af56ee2ec (patch) | |
| tree | 83cabb089d76c7dda49ac786ad829b6f37d17bbf /src/gpu/gpu.h | |
| parent | e96f282d77bd114493c8d9097c7fb7eaaad2338b (diff) | |
feat: Implement Sequence and Effect system for demo choreography
Refactors the rendering pipeline into a modular Sequence/Effect system. 'MainSequence' manages the final frame rendering and a list of 'Sequence' layers. 'Sequence' manages a timeline of 'Effect' objects (start/end/priority). Concrete effects (Heptagon, Particles) are moved to 'demo_effects.cc'. Updates main loop to pass beat and aspect ratio.
Diffstat (limited to 'src/gpu/gpu.h')
| -rw-r--r-- | src/gpu/gpu.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h index a78c433..f9c322c 100644 --- a/src/gpu/gpu.h +++ b/src/gpu/gpu.h @@ -32,7 +32,7 @@ struct RenderPass { }; void gpu_init(GLFWwindow *window); -void gpu_draw(float audio_peak, float aspect_ratio, float time); +void gpu_draw(float audio_peak, float aspect_ratio, float time, float beat); void gpu_shutdown(); // Helper functions (exposed for internal/future use) @@ -42,10 +42,12 @@ struct ResourceBinding { // WGPUBufferBindingType_Storage }; -GpuBuffer gpu_create_buffer(size_t size, uint32_t usage, +GpuBuffer gpu_create_buffer(WGPUDevice device, size_t size, uint32_t usage, const void *data = nullptr); -ComputePass gpu_create_compute_pass(const char *shader_code, +ComputePass gpu_create_compute_pass(WGPUDevice device, const char *shader_code, ResourceBinding *bindings, int num_bindings); -RenderPass gpu_create_render_pass(const char *shader_code, +RenderPass gpu_create_render_pass(WGPUDevice device, + WGPUTextureFormat format, // Needed for render pipeline + const char *shader_code, ResourceBinding *bindings, int num_bindings); |
