pub fn clear<T> (
        texture: &Texture,
        colour: T,
        device: &Device
    ) where 
    T: Color + Clone + Copy,
    {
        let capacity = texture.size.to_usize().area();
        let mut t_pixels : Vec<T> = Vec::with_capacity(capacity);
        t_pixels.resize(capacity, colour);
        
        Self::fill(
            texture,
            t_pixels.as_slice(),
            &device,
            
        )
    }
/// Clears a texture with a singular color
Clears a texture with a singular color
Clears a texture with a singular color
pub fn clear<T> (
        texture: &Texture,
        colour: T,
        device: &Device
    ) where 
    T: Color + Clone + Copy,
    {
        let capacity = texture.size.to_usize().area();
        let mut t_pixels : Vec<T> = Vec::with_capacity(capacity);
        t_pixels.resize(capacity, colour);
        Self::fill(
            texture,
            t_pixels.as_slice(),
            &device,
        )
    }
pub fn clear < T > ( texture : & Texture , colour : T , device : & Device ) where T : Color + Clone + Copy , { let capacity = texture . size . to_usize ( ) . area ( ) ; let mut t_pixels : Vec < T > = Vec :: with_capacity ( capacity ) ; t_pixels . resize ( capacity , colour ) ; Self :: fill ( texture , t_pixels . as_slice ( ) , & device , ) }
Clears a texture with a singular color
Clears a texture with a singular color
texture
&Texture
colour
T
device
&Device