pub fn data(&mut self, data: &[GLfloat], usage: Usage) {
        unsafe {
            gl::NamedBufferData(self.id,
                                (data.len() * mem::size_of::<GLfloat>()) as GLsizeiptr,
                                data.as_ptr() as *const _,
                                usage.into());
        }
    }
/// Reallocate and add data to the buffer
/// # Parameters
/// `data` is simply the slice of data to send to the GPU.
/// `usage` is only a hint to the driver how the data will
/// be used. A good choice could improve optimizations.
Reallocate and add data to the buffer
Reallocate and add data to the buffer
pub fn data(&mut self, data: &[GLfloat], usage: Usage) {
        unsafe {
            gl::NamedBufferData(self.id,
                                (data.len() * mem::size_of::<GLfloat>()) as GLsizeiptr,
                                data.as_ptr() as *const _,
                                usage.into());
        }
    }
pub fn data ( & mut self , data : & [ GLfloat ] , usage : Usage ) { unsafe { gl :: NamedBufferData ( self . id , ( data . len ( ) * mem :: size_of :: < GLfloat > ( ) ) as GLsizeiptr , data . as_ptr ( ) as * const _ , usage . into ( ) ) ; } }
Reallocate and add data to the buffer
Reallocate and add data to the buffer
&mut self
data
&[GLfloat]
usage
Usage
&mut self
data
&[GLfloat]
usage
Usage