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