pub fn textured_aabb(&mut self, texture: TexKey, min: Vec2<f32>, max: Vec2<f32>) {
        self.push_state_cmd(StateCmd::TextureChange(SamplerId::Texture(texture)));
        let color = Color::rgb(1.0, 1.0, 1.0);

        self.add_vertices(&[
            Vert { pos: Vec2::new(min.x, min.y), color, uv: Vec2::new(0.0, 0.0) },
            Vert { pos: Vec2::new(max.x, min.y), color, uv: Vec2::new(1.0, 0.0) },
            Vert { pos: Vec2::new(max.x, max.y), color, uv: Vec2::new(1.0, 1.0) },

            Vert { pos: Vec2::new(min.x, min.y), color, uv: Vec2::new(0.0, 0.0) },
            Vert { pos: Vec2::new(max.x, max.y), color, uv: Vec2::new(1.0, 1.0) },
            Vert { pos: Vec2::new(min.x, max.y), color, uv: Vec2::new(0.0, 1.0) },
        ]);
    }
/// Draws a textured axis-aligned bounding box.
Draws a textured axis-aligned bounding box.
Draws a textured axis - aligned bounding box .
pub fn textured_aabb(&mut self, texture: TexKey, min: Vec2<f32>, max: Vec2<f32>) {
        self.push_state_cmd(StateCmd::TextureChange(SamplerId::Texture(texture)));
        let color = Color::rgb(1.0, 1.0, 1.0);
        self.add_vertices(&[
            Vert { pos: Vec2::new(min.x, min.y), color, uv: Vec2::new(0.0, 0.0) },
            Vert { pos: Vec2::new(max.x, min.y), color, uv: Vec2::new(1.0, 0.0) },
            Vert { pos: Vec2::new(max.x, max.y), color, uv: Vec2::new(1.0, 1.0) },
            Vert { pos: Vec2::new(min.x, min.y), color, uv: Vec2::new(0.0, 0.0) },
            Vert { pos: Vec2::new(max.x, max.y), color, uv: Vec2::new(1.0, 1.0) },
            Vert { pos: Vec2::new(min.x, max.y), color, uv: Vec2::new(0.0, 1.0) },
        ]);
    }
pub fn textured_aabb ( & mut self , texture : TexKey , min : Vec2 < f32 > , max : Vec2 < f32 > ) { self . push_state_cmd ( StateCmd :: TextureChange ( SamplerId :: Texture ( texture ) ) ) ; let color = Color :: rgb ( 1.0 , 1.0 , 1.0 ) ; self . add_vertices ( & [ Vert { pos : Vec2 :: new ( min . x , min . y ) , color , uv : Vec2 :: new ( 0.0 , 0.0 ) } , Vert { pos : Vec2 :: new ( max . x , min . y ) , color , uv : Vec2 :: new ( 1.0 , 0.0 ) } , Vert { pos : Vec2 :: new ( max . x , max . y ) , color , uv : Vec2 :: new ( 1.0 , 1.0 ) } , Vert { pos : Vec2 :: new ( min . x , min . y ) , color , uv : Vec2 :: new ( 0.0 , 0.0 ) } , Vert { pos : Vec2 :: new ( max . x , max . y ) , color , uv : Vec2 :: new ( 1.0 , 1.0 ) } , Vert { pos : Vec2 :: new ( min . x , max . y ) , color , uv : Vec2 :: new ( 0.0 , 1.0 ) } , ] ) ; }
Draws a textured axis-aligned bounding box.
Draws a textured axis - aligned bounding box .
&mut self
texture
TexKey
min
Vec2<f32>
max
Vec2<f32>
&mut self
texture
TexKey
min
Vec2<f32>
max
Vec2<f32>