pub fn draw(self, drawer: &mut Drawer){
        let TextureDrawer{pos: (x, y), sin_cos: (sin, cos), colour, texture} = self;

        let uniforms = uniform! {
            h_size: drawer.graphics.h_size,
            tex   : &texture.tex,
            colour: colour,
            matrix: [
                [ cos, sin, 0., 0.],
                [-sin, cos, 0., 0.],
                [  0.,  0., 1., 0.],
                [  x ,  y , 0., 1.],
            ]
        };

        drawer.draw(&texture.vertex_buffer, &drawer.graphics.indices, &drawer.graphics.program, &uniforms, &drawer.graphics.params)
            .expect("draw failed")
    }
/// Consumes self and draws the texture to the screen with the given options
Consumes self and draws the texture to the screen with the given options
Consumes self and draws the texture to the screen with the given options
pub fn draw(self, drawer: &mut Drawer){
        let TextureDrawer{pos: (x, y), sin_cos: (sin, cos), colour, texture} = self;
        let uniforms = uniform! {
            h_size: drawer.graphics.h_size,
            tex   : &texture.tex,
            colour: colour,
            matrix: [
                [ cos, sin, 0., 0.],
                [-sin, cos, 0., 0.],
                [  0.,  0., 1., 0.],
                [  x ,  y , 0., 1.],
            ]
        };
        drawer.draw(&texture.vertex_buffer, &drawer.graphics.indices, &drawer.graphics.program, &uniforms, &drawer.graphics.params)
            .expect("draw failed")
    }
pub fn draw ( self , drawer : & mut Drawer ) { let TextureDrawer { pos : ( x , y ) , sin_cos : ( sin , cos ) , colour , texture } = self ; let uniforms = uniform ! { h_size drawer graphics h_size tex texture tex colour colour matrix [ [ cos sin 0. 0. ] [ sin cos 0. 0. ] [ 0. 0. 1. 0. ] [ x y 0. 1. ] ] } ; drawer . draw ( & texture . vertex_buffer , & drawer . graphics . indices , & drawer . graphics . program , & uniforms , & drawer . graphics . params ) . expect ( " " ) }
Consumes self and draws the texture to the screen with the given options
Consumes self and draws the texture to the screen with the given options
self
drawer
&mut Drawer
self
drawer
&mut Drawer