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

pub trait TypedBufferMut<T>: TypedBuffer<T> {
    pub unsafe fn with_map_write<F>(
        &mut self,
        flags: MapWriteFlags,
        f: F
    ) -> Result<(), Error>
    where
        F: Fn(&mut [T])
;
pub fn with_map_read_write<F>(
        &mut self,
        flags: MapReadWriteFlags,
        f: F
    ) -> Result<(), Error>
    where
        F: Fn(&mut [T])
; }

Buffer object with a type

Required methods

pub unsafe fn with_map_write<F>(
    &mut self,
    flags: MapWriteFlags,
    f: F
) -> Result<(), Error> where
    F: Fn(&mut [T]), 
[src]

Maps a buffer object’s data store

Pass a closure that receives the mapped buffer to access it

This method is unsafe cause reading from mapped slice would have undefined behaviour

see glMapBuffer

pub fn with_map_read_write<F>(
    &mut self,
    flags: MapReadWriteFlags,
    f: F
) -> Result<(), Error> where
    F: Fn(&mut [T]), 
[src]

Maps a buffer object’s data store

Pass a closure that receives the mapped buffer to access it

see glMapBuffer

Loading content...

Implementors

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

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

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

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

impl<'a, T, B, BB> TypedBufferMut<T> for Range<T, B, BB> where
    B: TypedBuffer<T> + WithMapRangeMut<T> + WithBackend,
    T: 'static,
    BB: BorrowMut<B>, 
[src]

Loading content...