Skip to main content

Data3DTextureInner

Struct Data3DTextureInner 

Source
pub struct Data3DTextureInner {
    pub width: u32,
    pub height: u32,
    pub depth: u32,
    pub data: Option<Vec<u8>>,
    pub format: TextureFormat,
    pub mag_filter: TextureFilter,
    pub min_filter: MinFilter,
    pub wrap_s: Wrapping,
    pub wrap_t: Wrapping,
    pub wrap_r: Wrapping,
    pub is_storage: bool,
    pub version: u32,
    /* private fields */
}
Expand description

The state behind a Data3DTexture handle.

Fields§

§width: u32

image.width.

§height: u32

image.height.

§depth: u32

image.depth.

§data: Option<Vec<u8>>

image.data, tightly packed texel rows, slice after slice — the Uint8Array of webgpu_volume_perlin for an r8unorm texture. None for a storage texture, which the GPU fills.

§format: TextureFormat

texture.format + texture.type, spelled as the GPU format WebGPUTextureUtils.getFormat() would pick.

§mag_filter: TextureFilter

texture.magFilter.

§min_filter: MinFilter

texture.minFilter.

§wrap_s: Wrapping

texture.wrapS.

§wrap_t: Wrapping

texture.wrapT.

§wrap_r: Wrapping

texture.wrapR — the third axis, unique to a volume texture.

§is_storage: bool

texture.isStorageTexture — created with STORAGE_BINDING and bound as texture_storage_3d by storageTexture() / textureStore().

§version: u32

texture.version, bumped by needsUpdate = true.

Trait Implementations§

Source§

impl Debug for Data3DTextureInner

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,