summaryrefslogtreecommitdiff
path: root/src/gpu/effects/particle_spray_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/particle_spray_effect.cc')
-rw-r--r--src/gpu/effects/particle_spray_effect.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/effects/particle_spray_effect.cc b/src/gpu/effects/particle_spray_effect.cc
index e8ead0a..452017e 100644
--- a/src/gpu/effects/particle_spray_effect.cc
+++ b/src/gpu/effects/particle_spray_effect.cc
@@ -6,9 +6,8 @@
#include <vector>
// --- ParticleSprayEffect ---
-ParticleSprayEffect::ParticleSprayEffect(WGPUDevice device, WGPUQueue queue,
- WGPUTextureFormat format)
- : Effect(device, queue) {
+ParticleSprayEffect::ParticleSprayEffect(const GpuContext& ctx)
+ : Effect(ctx) {
uniforms_ =
gpu_create_buffer(device_, sizeof(float) * 6,
WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
@@ -27,7 +26,7 @@ ParticleSprayEffect::ParticleSprayEffect(WGPUDevice device, WGPUQueue queue,
{particles_buffer_, WGPUBufferBindingType_ReadOnlyStorage},
{uniforms_, WGPUBufferBindingType_Uniform}};
render_pass_ =
- gpu_create_render_pass(device_, format, particle_render_wgsl, rb, 2);
+ gpu_create_render_pass(device_, format_, particle_render_wgsl, rb, 2);
render_pass_.vertex_count = 6;
render_pass_.instance_count = NUM_PARTICLES;
}