pub unsafe fn maybe_update_image(&mut self) {
        if !self.is_dirty {
            return;
        }
        self.is_dirty = false;

        self.update_cpu_image();
        rg::update_image(self.img, &{
            let mut data = rg::ImageData::default();
            data.subimage[0][0] = self.tex_data.as_slice().into();
            data
        });
    }
/// Call it every frame but only once
Call it every frame but only once
Call it every frame but only once
pub unsafe fn maybe_update_image(&mut self) {
        if !self.is_dirty {
            return;
        }
        self.is_dirty = false;
        self.update_cpu_image();
        rg::update_image(self.img, &{
            let mut data = rg::ImageData::default();
            data.subimage[0][0] = self.tex_data.as_slice().into();
            data
        });
    }
pub unsafe fn maybe_update_image ( & mut self ) { if ! self . is_dirty { return ; } self . is_dirty = false ; self . update_cpu_image ( ) ; rg :: update_image ( self . img , & { let mut data = rg :: ImageData :: default ( ) ; data . subimage [ 0 ] [ 0 ] = self . tex_data . as_slice ( ) . into ( ) ; data } ) ; }
Call it every frame but only once
Call it every frame but only once
&mut self
&mut self