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.
Fields of TextureSubresource
A new texture is introduced.
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.