pub fn fill<T> (
        texture: &Texture,
        t_pixels: &[T],
        device: &Device
    ) where
    T: bytemuck::Pod + Clone + Copy + 'static + Color,
    {
        assert!(
            t_pixels.len() as u32 >= texture.size.area(),
            "Fatal: incorrect length for t_pixel buffer. Pixels length: {} || Required buffer length: {}", t_pixels.len(), texture.size.area()
        );
        
        let rect = Rect::from_size(texture.size);
        let t_pixels = bytemuck::cast_slice(t_pixels);
        
        Self::copy(
            texture,
            rect,
            &device.queue,
            t_pixels,
            t_pixels.len() as u32 / texture.extent.height,
            texture.extent
        )
    }
/// Fill a texture with texture pixels
Fill a texture with texture pixels
Fill a texture with texture pixels
pub fn fill<T> (
        texture: &Texture,
        t_pixels: &[T],
        device: &Device
    ) where
    T: bytemuck::Pod + Clone + Copy + 'static + Color,
    {
        assert!(
            t_pixels.len() as u32 >= texture.size.area(),
            "Fatal: incorrect length for t_pixel buffer. Pixels length: {} || Required buffer length: {}", t_pixels.len(), texture.size.area()
        );
        let rect = Rect::from_size(texture.size);
        let t_pixels = bytemuck::cast_slice(t_pixels);
        Self::copy(
            texture,
            rect,
            &device.queue,
            t_pixels,
            t_pixels.len() as u32 / texture.extent.height,
            texture.extent
        )
    }
pub fn fill < T > ( texture : & Texture , t_pixels : & [ T ] , device : & Device ) where T : bytemuck :: Pod + Clone + Copy + ' static + Color , { assert ! ( t_pixels len ( ) as u32 texture size area ( ) " " t_pixels len ( ) texture size area ( ) ) ; let rect = Rect :: from_size ( texture . size ) ; let t_pixels = bytemuck :: cast_slice ( t_pixels ) ; Self :: copy ( texture , rect , & device . queue , t_pixels , t_pixels . len ( ) as u32 / texture . extent . height , texture . extent ) }
Fill a texture with texture pixels
Fill a texture with texture pixels
texture
&Texture
t_pixels
&[T]
device
&Device