pub struct VertexBufferLayout { /* private fields */ }Expand description
The layout of a single vertex buffer, expressed as an array stride plus a list of attributes.
Mirrors GPUVertexBufferLayout from the WebGPU spec. The renderer
passes the assembled descriptor straight to createRenderPipeline via
Reflect.
Implementations§
Source§impl VertexBufferLayout
impl VertexBufferLayout
pub fn new( array_stride: u64, step_mode: VertexStepMode, attributes: Vec<VertexAttribute>, ) -> Self
Source§impl VertexBufferLayout
impl VertexBufferLayout
pub fn get_array_stride(&self) -> u64
pub fn get_step_mode(&self) -> VertexStepMode
pub fn get_attributes(&self) -> &Vec<VertexAttribute>
Trait Implementations§
Source§impl Clone for VertexBufferLayout
impl Clone for VertexBufferLayout
Source§fn clone(&self) -> VertexBufferLayout
fn clone(&self) -> VertexBufferLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VertexBufferLayout
impl RefUnwindSafe for VertexBufferLayout
impl Send for VertexBufferLayout
impl Sync for VertexBufferLayout
impl Unpin for VertexBufferLayout
impl UnsafeUnpin for VertexBufferLayout
impl UnwindSafe for VertexBufferLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more