Enum pixel_widgets::draw::Update [−][src]
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
An existing texture is updated.
Show fields
A new texture is introduced.
Show fields
Fields of Texture
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.
size: [u32; 2]Size of the texture
data: Vec<u8>The texel data of the texture. 4 elements per pixel
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 RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> Any for T where
T: Any,
T: Any,