pub fn draw_elements(&self, mode: PrimitiveMode, count: usize) {
        if let Some(index_type) = self.index_type {
            unsafe {
                gl::BindVertexArray(self.array);
                gl::DrawElements(mode as GLenum, count as GLsizei, index_type, ptr::null());
            }
        } else {
            panic!("VertexArray::draw_elements called without a valid index buffer set!");
        }
    }
/// Draws the given type of primitives with the data in graphics buffers bound to this vertex
/// array, in the order specified by the set index buffer (See [`set_index_buffer`]). If you
/// have not set a index buffer this function will panic at runtime. You might want to use
/// [`draw`] instead.
///
/// [`set_index_buffer`]: #method.set_index_buffer
/// [`draw`]: #method.draw
Draws the given type of primitives with the data in graphics buffers bound to this vertex
array, in the order specified by the set index buffer (See [`set_index_buffer`]). If you
have not set a index buffer this function will panic at runtime. You might want to use
[`draw`] instead.


Draws the given type of primitives with the data in graphics buffers bound to this vertex array in the order specified by the set index buffer ( See [ ` set_index_buffer ` ] ) . If you have not set a index buffer this function will panic at runtime . You might want to use [ ` draw ` ] instead .
pub fn draw_elements(&self, mode: PrimitiveMode, count: usize) {
        if let Some(index_type) = self.index_type {
            unsafe {
                gl::BindVertexArray(self.array);
                gl::DrawElements(mode as GLenum, count as GLsizei, index_type, ptr::null());
            }
        } else {
            panic!("VertexArray::draw_elements called without a valid index buffer set!");
        }
    }
pub fn draw_elements ( & self , mode : PrimitiveMode , count : usize ) { if let Some ( index_type ) = self . index_type { unsafe { gl :: BindVertexArray ( self . array ) ; gl :: DrawElements ( mode as GLenum , count as GLsizei , index_type , ptr :: null ( ) ) ; } } else { panic ! ( " " ) ; } }
Draws the given type of primitives with the data in graphics buffers bound to this vertex
array, in the order specified by the set index buffer (See [`set_index_buffer`]).
Draws the given type of primitives with the data in graphics buffers bound to this vertex array in the order specified by the set index buffer ( See [ ` set_index_buffer ` ] ) .
&self
mode
PrimitiveMode
count
usize
&self
mode
PrimitiveMode
count
usize