Trait glin::buffer_object::TypedBufferObject [−][src]
pub trait TypedBufferObject<T> { fn id(&self) -> GLuint; fn len(&self) -> usize; fn capacity(&self) -> usize; fn map_read<F: Fn(&[T])>(&self, flags: MapReadFlags, f: F) -> Result<()>
where
Self: Sized; fn copy_to<U, B: BufferRange<U> + WithBackendMut<T>>(&self, dst: &mut B)
where
Self: Sized; fn bytes(&self) -> usize { ... } fn capacity_bytes(&self) -> usize { ... } fn stride(&self) -> usize { ... } }
Buffer object with a type
Required Methods
fn id(&self) -> GLuint
OpenGL id
fn len(&self) -> usize
Number of elements on the last update
fn capacity(&self) -> usize
Allocated capacity of the buffer in number of elements
fn map_read<F: Fn(&[T])>(&self, flags: MapReadFlags, f: F) -> Result<()> where
Self: Sized,
Self: Sized,
Maps a buffer object's data store
Pass a closure that receives the mapped buffer to access it
see glMapBuffer
fn copy_to<U, B: BufferRange<U> + WithBackendMut<T>>(&self, dst: &mut B) where
Self: Sized,
Self: Sized,
Copy one buffer into another
Provided Methods
fn bytes(&self) -> usize
Total bytes on the last update
fn capacity_bytes(&self) -> usize
Total capcacity of the buffer in bytes
fn stride(&self) -> usize
Stride of the buffer type
Implementors
impl<'a, T: 'static> TypedBufferObject<T> for BufferObject<T>
impl<T: 'static> TypedBufferObject<T> for BufferObjectImmutable<T>
impl<T: 'static> TypedBufferObject<T> for SharedBuffer<T>
impl<T: 'static, B: TypedBufferObject<T> + MapRange<T> + WithBackend<T>, BB: Borrow<B>> TypedBufferObject<T> for Range<T, B, BB>
impl<T: 'static> TypedBufferObject<T> for SharedBufferImmutable<T>