pub struct Texture { /* private fields */ }Expand description
an image on the GPU: 2D, 2D array, cube (array) or 3D, with mips
Implementations§
Source§impl Texture
impl Texture
Sourcepub fn view(&self) -> &TextureView
pub fn view(&self) -> &TextureView
the view of everything (its natural dimension)
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn depth(&self) -> u32
pub fn layers(&self) -> u32
pub fn mips(&self) -> u32
pub fn format(&self) -> Format
pub fn usage(&self) -> TextureUsage
Sourcepub fn create_view(&self, desc: &ViewDesc) -> Result<TextureView>
pub fn create_view(&self, desc: &ViewDesc) -> Result<TextureView>
a view of some mips / layers (counts 0: to the end)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Texture
impl !UnwindSafe for Texture
impl Forget for Texture
impl Freeze for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl UnsafeUnpin for Texture
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