pub struct DecodedTexture {
pub key: String,
pub pixels: Vec<u8>,
pub width: u32,
pub height: u32,
}Expand description
Decoded embedded texture data (ready for GPU upload)
This is the result of decoding an embedded texture from a WASM plugin. The pixel data is in RGBA8 format, ready to be uploaded to the GPU.
Fields§
§key: StringUnique key for runtime lookup (matches EmbeddedTexture::key)
pixels: Vec<u8>Decoded RGBA8 pixel data
width: u32Width in pixels
height: u32Height in pixels
Implementations§
Trait Implementations§
Source§impl Clone for DecodedTexture
impl Clone for DecodedTexture
Source§fn clone(&self) -> DecodedTexture
fn clone(&self) -> DecodedTexture
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DecodedTexture
impl RefUnwindSafe for DecodedTexture
impl Send for DecodedTexture
impl Sync for DecodedTexture
impl Unpin for DecodedTexture
impl UnwindSafe for DecodedTexture
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