pub fn point(&mut self, point: Vec2<f32>, size: f32, color: Color) {
        self.push_state_cmd(StateCmd::TextureChange(SamplerId::Solid));

        let size = size / 2.0;
        let uv = Vec2::ZERO;
        self.add_vertices(&[
            Vert { pos: point + Vec2::new(-size, -size), uv, color },
            Vert { pos: point + Vec2::new( size, -size), uv, color },
            Vert { pos: point + Vec2::new( size,  size), uv, color },
            Vert { pos: point + Vec2::new(-size, -size), uv, color },
            Vert { pos: point + Vec2::new( size,  size), uv, color },
            Vert { pos: point + Vec2::new(-size,  size), uv, color },
        ]);
    }
/// Generates the vertices for a square with the given side length centered at the given point.
Generates the vertices for a square with the given side length centered at the given point.
Generates the vertices for a square with the given side length centered at the given point .
pub fn point(&mut self, point: Vec2<f32>, size: f32, color: Color) {
        self.push_state_cmd(StateCmd::TextureChange(SamplerId::Solid));
        let size = size / 2.0;
        let uv = Vec2::ZERO;
        self.add_vertices(&[
            Vert { pos: point + Vec2::new(-size, -size), uv, color },
            Vert { pos: point + Vec2::new( size, -size), uv, color },
            Vert { pos: point + Vec2::new( size,  size), uv, color },
            Vert { pos: point + Vec2::new(-size, -size), uv, color },
            Vert { pos: point + Vec2::new( size,  size), uv, color },
            Vert { pos: point + Vec2::new(-size,  size), uv, color },
        ]);
    }
pub fn point ( & mut self , point : Vec2 < f32 > , size : f32 , color : Color ) { self . push_state_cmd ( StateCmd :: TextureChange ( SamplerId :: Solid ) ) ; let size = size / 2.0 ; let uv = Vec2 :: ZERO ; self . add_vertices ( & [ Vert { pos : point + Vec2 :: new ( - size , - size ) , uv , color } , Vert { pos : point + Vec2 :: new ( size , - size ) , uv , color } , Vert { pos : point + Vec2 :: new ( size , size ) , uv , color } , Vert { pos : point + Vec2 :: new ( - size , - size ) , uv , color } , Vert { pos : point + Vec2 :: new ( size , size ) , uv , color } , Vert { pos : point + Vec2 :: new ( - size , size ) , uv , color } , ] ) ; }
Generates the vertices for a square with the given side length centered at the given point.
Generates the vertices for a square with the given side length centered at the given point .
&mut self
point
Vec2<f32>
size
f32
color
Color
&mut self
point
Vec2<f32>
size
f32
color
Color