summaryrefslogtreecommitdiff
path: root/src/gpu/uniform_helper.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-17 11:16:24 +0100
committerskal <pascal.massimino@gmail.com>2026-02-17 11:16:24 +0100
commitbd26bc743933dcd5241fc87d160a893f83644dfb (patch)
tree373aa9c866fc6f6bbc58f4e27395f58563acbccc /src/gpu/uniform_helper.h
parenta1789611cdce872c2cecb2c6412c9eda12745916 (diff)
docs(gpu): Purge comment bloat from GPU headers
Removed redundant and obvious comments from 7 GPU headers: - post_process_helper.h: binding comments, stale UniformsSequenceParams note - shader_composer.h: verbose Compose/VerifyIncludes descriptions - uniform_helper.h: obvious method comments - effect.h: redundant render/resize comments - gpu.h: verbose struct/header comments, GPU perf placeholder - sdf_effect.h: obvious method comments - sequence.h: duplicate header, obvious API comments Kept only non-obvious context (binding conventions, headless mode notes). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/gpu/uniform_helper.h')
-rw-r--r--src/gpu/uniform_helper.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gpu/uniform_helper.h b/src/gpu/uniform_helper.h
index 8556c98..b2f3406 100644
--- a/src/gpu/uniform_helper.h
+++ b/src/gpu/uniform_helper.h
@@ -1,12 +1,10 @@
// This file is part of the 64k demo project.
-// It provides a generic uniform buffer helper to reduce boilerplate.
-// Templated on uniform struct type for type safety and automatic sizing.
+// Generic uniform buffer helper.
#pragma once
#include "gpu/gpu.h"
-// Generic uniform buffer helper
// Usage:
// UniformBuffer<MyUniforms> uniforms_;
// uniforms_.init(device);
@@ -15,18 +13,15 @@ template <typename T> class UniformBuffer {
public:
UniformBuffer() = default;
- // Initialize the uniform buffer with the device
void init(WGPUDevice device) {
buffer_ = gpu_create_buffer(
device, sizeof(T), WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst);
}
- // Update the uniform buffer with new data
void update(WGPUQueue queue, const T& data) {
wgpuQueueWriteBuffer(queue, buffer_.buffer, 0, &data, sizeof(T));
}
- // Get the underlying GpuBuffer (for bind group creation)
GpuBuffer& get() {
return buffer_;
}