pub struct TextureSpec {
pub width: u32,
pub height: u32,
pub format: TextureFormat,
pub data: Vec<u8>,
pub generate_mips: bool,
}Fields§
§width: u32§height: u32§format: TextureFormat§data: Vec<u8>§generate_mips: boolImplementations§
Source§impl TextureSpec
impl TextureSpec
Sourcepub fn wgpu_descriptor(&self) -> TextureDescriptor<'static>
pub fn wgpu_descriptor(&self) -> TextureDescriptor<'static>
Pure conversion — you call device.create_texture(&spec.wgpu_descriptor()) yourself.
Source§impl TextureSpec
impl TextureSpec
pub fn new(width: u32, height: u32, data: Vec<u8>, generate_mips: bool) -> Self
pub fn with_format(self, format: TextureFormat) -> Self
Auto Trait Implementations§
impl Freeze for TextureSpec
impl RefUnwindSafe for TextureSpec
impl Send for TextureSpec
impl Sync for TextureSpec
impl Unpin for TextureSpec
impl UnsafeUnpin for TextureSpec
impl UnwindSafe for TextureSpec
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