pub struct TextureDesc {
pub width: u32,
pub height: u32,
pub format: TextureFormat,
pub usage: TextureUsages,
pub label: Option<String>,
}Expand description
Describes a texture to create: dimensions, format, usage, and an optional debug label.
sample_count is deliberately not a field here — this crate creates
no multisampled texture, and Self::sample_count always answers 1;
there is no setter to request anything else.
Fields§
§width: u32Texture width in texels.
height: u32Texture height in texels.
format: TextureFormatThe texture’s pixel format.
usage: TextureUsagesHow the texture may be used (render attachment, sampled binding, copy source/destination, …).
label: Option<String>Optional debug label, surfaced in adapter/validation diagnostics.
Implementations§
Source§impl TextureDesc
impl TextureDesc
Sourcepub const fn sample_count(&self) -> u32
pub const fn sample_count(&self) -> u32
The sample count every texture built from this descriptor uses.
Always 1 — no MSAA. Not a field, so there is nothing to set.
Trait Implementations§
Source§impl Clone for TextureDesc
impl Clone for TextureDesc
Source§impl Debug for TextureDesc
impl Debug for TextureDesc
impl Eq for TextureDesc
Source§impl PartialEq for TextureDesc
impl PartialEq for TextureDesc
impl StructuralPartialEq for TextureDesc
Auto Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.