fn draw_data<S>(&self, data: &[S], usage: gl::types::GLenum) {
        self.bind();
        // Safety: the size of the data **MUST** be correct.
        unsafe {
            gl::BufferData(
                T,
                (data.len() * ::std::mem::size_of::<S>()) as gl::types::GLsizeiptr,
                data.as_ptr() as *const gl::types::GLvoid,
                usage,
            );
        }
    }
/// Uploads data to the buffer with the given usage hint.
Uploads data to the buffer with the given usage hint.
Uploads data to the buffer with the given usage hint .
fn draw_data<S>(&self, data: &[S], usage: gl::types::GLenum) {
        self.bind();
        // Safety: the size of the data **MUST** be correct.
        unsafe {
            gl::BufferData(
                T,
                (data.len() * ::std::mem::size_of::<S>()) as gl::types::GLsizeiptr,
                data.as_ptr() as *const gl::types::GLvoid,
                usage,
            );
        }
    }
fn draw_data < S > ( & self , data : & [ S ] , usage : gl :: types :: GLenum ) { self . bind ( ) ; // Safety: the size of the data **MUST** be correct. unsafe { gl :: BufferData ( T , ( data . len ( ) * :: std :: mem :: size_of :: < S > ( ) ) as gl :: types :: GLsizeiptr , data . as_ptr ( ) as * const gl :: types :: GLvoid , usage , ) ; } }
Uploads data to the buffer with the given usage hint.
Uploads data to the buffer with the given usage hint .
&self
data
&[S]
usage
gl::types::GLenum
&self
data
&[S]
usage
gl::types::GLenum