pub struct VertexBuffer<T: VertexType> { /* private fields */ }
Implementations§
Source§impl<T: VertexType> VertexBuffer<T>
impl<T: VertexType> VertexBuffer<T>
pub fn new( display: &mut Display, prim: &PrimitivesAddon, init_data: Option<&[T]>, size: u32, flags: BufferFlags, ) -> Result<Self, ()>
Sourcepub fn lock(
&mut self,
start: u32,
len: u32,
write: bool,
) -> Result<VertexBufferLock<'_, T, T>, ()>
pub fn lock( &mut self, start: u32, len: u32, write: bool, ) -> Result<VertexBufferLock<'_, T, T>, ()>
Locks the buffer for reading and optionally writing.
Sourcepub fn lock_write_only(
&mut self,
start: u32,
len: u32,
) -> Result<VertexBufferLock<'_, T, MaybeUninit<T>>, ()>
pub fn lock_write_only( &mut self, start: u32, len: u32, ) -> Result<VertexBufferLock<'_, T, MaybeUninit<T>>, ()>
Locks the buffer for only writing.
This is unsafe because the contents of the lock are undefined.
pub fn len(&mut self) -> u32
pub fn get_allegro_buffer(&self) -> *mut ALLEGRO_VERTEX_BUFFER
Trait Implementations§
Source§impl<T: VertexType> Drop for VertexBuffer<T>
impl<T: VertexType> Drop for VertexBuffer<T>
Auto Trait Implementations§
impl<T> Freeze for VertexBuffer<T>
impl<T> RefUnwindSafe for VertexBuffer<T>where
T: RefUnwindSafe,
impl<T> !Send for VertexBuffer<T>
impl<T> !Sync for VertexBuffer<T>
impl<T> Unpin for VertexBuffer<T>where
T: Unpin,
impl<T> UnwindSafe for VertexBuffer<T>where
T: UnwindSafe,
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