summaryrefslogtreecommitdiff
path: root/src/gpu/effects/moving_ellipse_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/moving_ellipse_effect.cc')
-rw-r--r--src/gpu/effects/moving_ellipse_effect.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/effects/moving_ellipse_effect.cc b/src/gpu/effects/moving_ellipse_effect.cc
index 3b73697..1163215 100644
--- a/src/gpu/effects/moving_ellipse_effect.cc
+++ b/src/gpu/effects/moving_ellipse_effect.cc
@@ -5,15 +5,14 @@
#include "gpu/gpu.h"
// --- MovingEllipseEffect ---
-MovingEllipseEffect::MovingEllipseEffect(WGPUDevice device, WGPUQueue queue,
- WGPUTextureFormat format)
- : Effect(device, queue) {
+MovingEllipseEffect::MovingEllipseEffect(const GpuContext& ctx)
+ : Effect(ctx) {
uniforms_ =
gpu_create_buffer(device_, sizeof(float) * 6,
WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
ResourceBinding bindings[] = {{uniforms_, WGPUBufferBindingType_Uniform}};
pass_ =
- gpu_create_render_pass(device_, format, ellipse_shader_wgsl, bindings, 1);
+ gpu_create_render_pass(device_, format_, ellipse_shader_wgsl, bindings, 1);
pass_.vertex_count = 3;
}
void MovingEllipseEffect::render(WGPURenderPassEncoder pass, float t, float b,