diff options
author | 2022-11-03 05:00:35 +0100 | |
---|---|---|
committer | 2022-11-03 05:00:35 +0100 | |
commit | 99cf98971dae22ae65adb2104c5a3eec578649f1 (patch) | |
tree | 63dacbee235d79c5895fda9072a0f6b683129131 /wgpu/src/buffers.rs | |
parent | 7e22e2d45293c5916812be03dc7367134b69b3ad (diff) | |
download | iced-99cf98971dae22ae65adb2104c5a3eec578649f1.tar.gz iced-99cf98971dae22ae65adb2104c5a3eec578649f1.tar.bz2 iced-99cf98971dae22ae65adb2104c5a3eec578649f1.zip |
Rename `buffers` module to `buffer`
... and move `StaticBuffer` to nested `static` module
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/buffer/static.rs (renamed from wgpu/src/buffers.rs) | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/wgpu/src/buffers.rs b/wgpu/src/buffer/static.rs index 707ad832..cf06790c 100644 --- a/wgpu/src/buffers.rs +++ b/wgpu/src/buffer/static.rs @@ -1,6 +1,3 @@ -//! Utilities for buffer operations. -pub mod dynamic; - use bytemuck::{Pod, Zeroable}; use std::marker::PhantomData; use std::mem; @@ -11,7 +8,7 @@ const DEFAULT_STATIC_BUFFER_COUNT: wgpu::BufferAddress = 128; /// A generic buffer struct useful for items which have no alignment requirements /// (e.g. Vertex, Index buffers) & no dynamic offsets. #[derive(Debug)] -pub(crate) struct StaticBuffer<T> { +pub(crate) struct Buffer<T> { //stored sequentially per mesh iteration; refers to the offset index in the GPU buffer offsets: Vec<wgpu::BufferAddress>, label: &'static str, @@ -21,7 +18,7 @@ pub(crate) struct StaticBuffer<T> { _data: PhantomData<T>, } -impl<T: Pod + Zeroable> StaticBuffer<T> { +impl<T: Pod + Zeroable> Buffer<T> { /// Initialize a new static buffer. pub fn new( device: &wgpu::Device, |