summaryrefslogtreecommitdiff
path: root/src/gpu/demo_effects.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-31 21:11:11 +0100
committerskal <pascal.massimino@gmail.com>2026-01-31 21:11:11 +0100
commit25e693cc46324b4ec588530de542bba8af6f47c6 (patch)
tree8a959e442f9330dd3f881fe4109e83b831f25a7e /src/gpu/demo_effects.cc
parent9379697ccdf6f44ade7933d5635f72f644f6b92e (diff)
style: add vertical compression rules to clang-format
- Enabled AllowShortFunctionsOnASingleLine: All - Enabled AllowShortBlocksOnASingleLine: Always - Enabled AllowShortIfStatementsOnASingleLine: Always - Enabled AllowShortLoopsOnASingleLine: true - Set MaxEmptyLinesToKeep: 1 - Applied formatting to all source files.
Diffstat (limited to 'src/gpu/demo_effects.cc')
-rw-r--r--src/gpu/demo_effects.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpu/demo_effects.cc b/src/gpu/demo_effects.cc
index 27712d3..77fb152 100644
--- a/src/gpu/demo_effects.cc
+++ b/src/gpu/demo_effects.cc
@@ -320,8 +320,7 @@ static void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline,
WGPUBindGroup *bind_group,
WGPUTextureView input_view,
GpuBuffer uniforms) {
- if (*bind_group)
- wgpuBindGroupRelease(*bind_group);
+ if (*bind_group) wgpuBindGroupRelease(*bind_group);
WGPUBindGroupLayout bgl = wgpuRenderPipelineGetBindGroupLayout(pipeline, 0);
WGPUSamplerDescriptor sd = {};
sd.magFilter = WGPUFilterMode_Linear;
@@ -386,8 +385,7 @@ ParticleSprayEffect::ParticleSprayEffect(WGPUDevice device, WGPUQueue queue,
gpu_create_buffer(device, sizeof(float) * 4,
WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
std::vector<Particle> init_p(NUM_PARTICLES);
- for (auto &p : init_p)
- p.pos[3] = 0.0f;
+ for (auto &p : init_p) p.pos[3] = 0.0f;
particles_buffer_ = gpu_create_buffer(
device, sizeof(Particle) * NUM_PARTICLES,
WGPUBufferUsage_Storage | WGPUBufferUsage_Vertex, init_p.data());