pub struct TextureDesc {
pub width: u32,
pub height: u32,
pub depth: u32,
pub layers: u32,
pub mips: u32,
pub format: Format,
pub usage: TextureUsage,
pub cube: bool,
}Expand description
Device::create_texture: a 2D texture (layers > 1: an array; cube: 6 * n layers) or a 3D one (depth > 1)
Fields§
§width: u32§height: u32§depth: u321 for 2D textures
layers: u321 for a single texture
mips: u32mip levels (1 = none)
format: Format§usage: TextureUsage§cube: boolcube faces: layers is a multiple of 6
Implementations§
Source§impl TextureDesc
impl TextureDesc
Sourcepub const fn d2(
width: u32,
height: u32,
format: Format,
usage: TextureUsage,
) -> TextureDesc
pub const fn d2( width: u32, height: u32, format: Format, usage: TextureUsage, ) -> TextureDesc
a single-level 2D texture
Trait Implementations§
Source§impl Clone for TextureDesc
impl Clone for TextureDesc
impl Copy for TextureDesc
Auto Trait Implementations§
impl Forget for TextureDesc
impl Freeze for TextureDesc
impl RefUnwindSafe for TextureDesc
impl Send for TextureDesc
impl Sync for TextureDesc
impl Unpin for TextureDesc
impl UnsafeUnpin for TextureDesc
impl UnwindSafe for TextureDesc
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