pub struct RcTexture { /* private fields */ }Expand description
A source of raw image data.
Once this texture has been uploaded to the GPU, the image data will be automatically removed from RAM.
Implementations§
Source§impl RcTexture
impl RcTexture
pub fn new(image: impl Into<RgbaImage>) -> Self
pub fn from_prepass_texture( texture_view: TextureView, size: PhysicalSizeU32, ) -> Self
pub fn replace_with_image( &mut self, image: impl Into<RgbaImage>, ) -> Result<(), ()>
pub fn replace_prepass_texture( &mut self, texture_view: TextureView, size: PhysicalSizeU32, ) -> Result<(), ()>
pub fn mark_prepass_texture_dirty(&mut self)
pub fn size(&self) -> PhysicalSizeU32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RcTexture
impl !RefUnwindSafe for RcTexture
impl !Send for RcTexture
impl !Sync for RcTexture
impl Unpin for RcTexture
impl !UnwindSafe for RcTexture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more