Skip to main content

Texture2dArray

Struct Texture2dArray 

Source
pub struct Texture2dArray<T: ?Sized> {
    pub dimensions: Vec2<NonZeroU32>,
    pub array_layers: NonZeroU32,
    pub mip_levels: NonZeroU32,
    pub data: T,
}
Expand description

2-dimensional array texture object.

Use this type to satisfy a texture binding in a resource struct, when the binding has WGSL type texture_2d_array.

Fields§

§dimensions: Vec2<NonZeroU32>§array_layers: NonZeroU32§mip_levels: NonZeroU32§data: T

Trait Implementations§

Source§

impl<T: Clone + ?Sized> Clone for Texture2dArray<T>

Source§

fn clone(&self) -> Texture2dArray<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + ?Sized> Debug for Texture2dArray<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Hash + ?Sized> Hash for Texture2dArray<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: PartialEq + ?Sized> PartialEq for Texture2dArray<T>

Source§

fn eq(&self, other: &Texture2dArray<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: ?Sized + Read> Query for Texture2dArray<T>

Source§

type Dimensions = Vec2<NonZero<u32>>

Type of the dimensions of the texture. Should be a Scalar, Vec2, or Vec3 of NonZeroU32.
Source§

type Component = <T as Read>::Component

Numeric type exposed to the shader. Read more
Source§

fn base_dimensions(&self) -> Self::Dimensions

Returns the dimensions of mip level 0 of the texture.
Source§

fn mip_levels(&self) -> NonZeroU32

Returns the count of mip levels of the texture.
Source§

fn array_layers(&self) -> NonZeroU32

Returns the count of array layers of the texture. Read more
Source§

fn samples(&self) -> NonZeroU32

Returns the count of samples of the texture. Read more
Source§

impl<T: ?Sized + Read> Read for Texture2dArray<T>

Source§

type Coordinates = <T as Read>::Coordinates

Source§

type Component = <T as Read>::Component

Source§

fn read_texel( &self, coordinates: Self::Coordinates, array_layer: i32, sample: i32, mip_level: i32, ) -> Vec4<Self::Component>

Loads a single texel from the texture. Read more
Source§

impl<T: Copy + ?Sized> Copy for Texture2dArray<T>

Source§

impl<T: Eq + ?Sized> Eq for Texture2dArray<T>

Source§

impl<T: ?Sized> StructuralPartialEq for Texture2dArray<T>

Auto Trait Implementations§

§

impl<T> Freeze for Texture2dArray<T>
where T: Freeze + ?Sized,

§

impl<T> RefUnwindSafe for Texture2dArray<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Send for Texture2dArray<T>
where T: Send + ?Sized,

§

impl<T> Sync for Texture2dArray<T>
where T: Sync + ?Sized,

§

impl<T> Unpin for Texture2dArray<T>
where T: Unpin + ?Sized,

§

impl<T> UnsafeUnpin for Texture2dArray<T>
where T: UnsafeUnpin + ?Sized,

§

impl<T> UnwindSafe for Texture2dArray<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.