Trait rin::gl::buffer::TypedBuffer[][src]

pub trait TypedBuffer<T> {
    pub fn id(&self) -> u32;
pub fn len(&self) -> usize;
pub fn capacity(&self) -> usize;
pub fn with_map_read<F>(
        &self,
        flags: MapReadFlags,
        f: F
    ) -> Result<(), Error>
    where
        F: FnMut(&[T])
;
pub unsafe fn unmap(&self);
pub fn copy_to<U, B>(&self, dst: &mut B)
    where
        B: BufferRange<U> + WithBackendMut
; pub fn is_empty(&self) -> bool { ... }
pub fn bytes(&self) -> usize { ... }
pub fn capacity_bytes(&self) -> usize { ... }
pub fn stride(&self) -> usize { ... } }

Buffer object with a type

Required methods

pub fn id(&self) -> u32[src]

OpenGL id

pub fn len(&self) -> usize[src]

Number of elements on the last update

pub fn capacity(&self) -> usize[src]

Allocated capacity of the buffer in number of elements

pub fn with_map_read<F>(&self, flags: MapReadFlags, f: F) -> Result<(), Error> where
    F: FnMut(&[T]), 
[src]

Maps a buffer object’s data store

Pass a closure that receives the mapped buffer to access it

see glMapBuffer

pub unsafe fn unmap(&self)[src]

pub fn copy_to<U, B>(&self, dst: &mut B) where
    B: BufferRange<U> + WithBackendMut
[src]

Copy one buffer into another

Loading content...

Provided methods

pub fn is_empty(&self) -> bool[src]

pub fn bytes(&self) -> usize[src]

Total bytes on the last update

pub fn capacity_bytes(&self) -> usize[src]

Total capcacity of the buffer in bytes

pub fn stride(&self) -> usize[src]

Stride of the buffer type

Loading content...

Implementors

impl<'_, T> TypedBuffer<T> for &'_ SharedBufferStorage<T> where
    T: 'static, 
[src]

impl<'a, '_, T> TypedBuffer<T> for &'_ Buffer<T> where
    T: 'static, 
[src]

impl<'a, '_, T> TypedBuffer<T> for &'_ BufferStorage<T> where
    T: 'static, 
[src]

impl<'a, '_, T> TypedBuffer<T> for &'_ SharedBuffer<T> where
    T: 'static, 
[src]

impl<'a, T> TypedBuffer<T> for Buffer<T> where
    T: 'static, 
[src]

impl<T> TypedBuffer<T> for BufferStorage<T> where
    T: 'static, 
[src]

impl<T> TypedBuffer<T> for SharedBuffer<T> where
    T: 'static, 
[src]

impl<T> TypedBuffer<T> for SharedBufferStorage<T> where
    T: 'static, 
[src]

impl<T, B, BB> TypedBuffer<T> for Range<T, B, BB> where
    B: TypedBuffer<T> + WithMapRange<T> + WithBackend,
    T: 'static,
    BB: Borrow<B>, 
[src]

Loading content...