Enum vulkano::buffer::IndexBuffer
source · pub enum IndexBuffer {
U8(Subbuffer<[u8]>),
U16(Subbuffer<[u16]>),
U32(Subbuffer<[u32]>),
}
Expand description
A buffer holding index values, which index into buffers holding vertex data.
Variants§
U8(Subbuffer<[u8]>)
An index buffer containing unsigned 8-bit indices.
The index_type_uint8
feature must be enabled on the device.
U16(Subbuffer<[u16]>)
An index buffer containing unsigned 16-bit indices.
U32(Subbuffer<[u32]>)
An index buffer containing unsigned 32-bit indices.
Implementations§
source§impl IndexBuffer
impl IndexBuffer
sourcepub fn index_type(&self) -> IndexType
pub fn index_type(&self) -> IndexType
Returns an IndexType
value corresponding to the type of the buffer.
sourcepub fn as_bytes(&self) -> &Subbuffer<[u8]>
pub fn as_bytes(&self) -> &Subbuffer<[u8]>
Returns the buffer reinterpreted as a buffer of bytes.
sourcepub fn len(&self) -> DeviceSize
pub fn len(&self) -> DeviceSize
Returns the number of elements in the buffer.
Trait Implementations§
source§impl Clone for IndexBuffer
impl Clone for IndexBuffer
source§fn clone(&self) -> IndexBuffer
fn clone(&self) -> IndexBuffer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IndexBuffer
impl Debug for IndexBuffer
Auto Trait Implementations§
impl !RefUnwindSafe for IndexBuffer
impl Send for IndexBuffer
impl Sync for IndexBuffer
impl Unpin for IndexBuffer
impl !UnwindSafe for IndexBuffer
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