pub fn new(display: &Display, colour: [f32; 4], vertices: [[f32; 2]; 4]) -> Result<Self, ::glium::vertex::BufferCreationError>{
        VertexBuffer::new(display, &[
            ColourVertex::new(vertices[0], colour),
            ColourVertex::new(vertices[1], colour),
            ColourVertex::new(vertices[2], colour),
            ColourVertex::new(vertices[3], colour)
        ]).map(|vb| Quad{
            vertex_buffer: vb
        })
    }
/// Creates a new quad from the vertices with one colour for the whole quad
Creates a new quad from the vertices with one colour for the whole quad
Creates a new quad from the vertices with one colour for the whole quad
pub fn new(display: &Display, colour: [f32; 4], vertices: [[f32; 2]; 4]) -> Result<Self, ::glium::vertex::BufferCreationError>{
        VertexBuffer::new(display, &[
            ColourVertex::new(vertices[0], colour),
            ColourVertex::new(vertices[1], colour),
            ColourVertex::new(vertices[2], colour),
            ColourVertex::new(vertices[3], colour)
        ]).map(|vb| Quad{
            vertex_buffer: vb
        })
    }
pub fn new ( display : & Display , colour : [ f32 ; 4 ] , vertices : [ [ f32 ; 2 ] ; 4 ] ) -> Result < Self , :: glium :: vertex :: BufferCreationError > { VertexBuffer :: new ( display , & [ ColourVertex :: new ( vertices [ 0 ] , colour ) , ColourVertex :: new ( vertices [ 1 ] , colour ) , ColourVertex :: new ( vertices [ 2 ] , colour ) , ColourVertex :: new ( vertices [ 3 ] , colour ) ] ) . map ( | vb | Quad { vertex_buffer : vb } ) }
Creates a new quad from the vertices with one colour for the whole quad
Creates a new quad from the vertices with one colour for the whole quad
display
&Display
colour
[f32; 4]
vertices
[[f32; 2]; 4]
display
&Display
colour
[f32; 4]
vertices
[[f32; 2]; 4]