pub enum Update {
TextureSubresource {
id: usize,
offset: [u32; 2],
size: [u32; 2],
data: Vec<u8>,
},
Texture {
id: usize,
size: [u32; 2],
data: Vec<u8>,
atlas: bool,
},
}Expand description
An update of the available texture data. The backend is responsible for uploading the provided data to the GPU.
Variants§
TextureSubresource
An existing texture is updated.
Fields
Texture
A new texture is introduced.
Fields
§
id: usizeThe id for the new texture. This is the id that will later be used to identify which texture the backend has to use whenever applicable.
§
atlas: boolWhether the texture will be used as atlas. true means the texture might be updated
later with TextureSubresource, while false means the texture is
immutable.
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
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