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