diff options
Diffstat (limited to 'src/gpu/uniform_helper.h')
| -rw-r--r-- | src/gpu/uniform_helper.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/uniform_helper.h b/src/gpu/uniform_helper.h index afc4a4b..151153f 100644 --- a/src/gpu/uniform_helper.h +++ b/src/gpu/uniform_helper.h @@ -12,15 +12,14 @@ // UniformBuffer<MyUniforms> uniforms_; // uniforms_.init(device); // uniforms_.update(queue, my_data); -template <typename T> -class UniformBuffer { +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); + buffer_ = gpu_create_buffer( + device, sizeof(T), WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); } // Update the uniform buffer with new data |
