[][src]Struct imgui_wgpu::TextureConfig

pub struct TextureConfig<'a> {
    pub size: Extent3d,
    pub label: Option<&'a str>,
    pub format: Option<TextureFormat>,
    pub usage: TextureUsage,
    pub mip_level_count: u32,
    pub sample_count: u32,
    pub dimension: TextureDimension,
}

Config for creating a texture.

Uses the builder pattern.

Fields

size: Extent3d

The size of the texture.

label: Option<&'a str>

An optional label for the texture used for debugging.

format: Option<TextureFormat>

The format of the texture, if not set uses the format from the renderer.

usage: TextureUsage

The usage of the texture.

mip_level_count: u32

The mip level of the texture.

sample_count: u32

The sample count of the texture.

dimension: TextureDimension

The dimension of the texture.

Implementations

impl<'a> TextureConfig<'a>[src]

pub fn new(width: u32, height: u32) -> TextureConfig<'static>[src]

Create a new texture config with the specified width and height.

pub fn set_depth(self, depth: u32) -> Self[src]

Set the depth of the texture.

pub fn set_label<'b>(self, label: &'b str) -> TextureConfig<'b>[src]

Set the debug label of the texture.

pub fn set_format(self, format: TextureFormat) -> Self[src]

Set the texture format.

pub fn set_usage(self, usage: TextureUsage) -> Self[src]

Set the texture usage.

pub fn set_mip_level_count(self, mip_level_count: u32) -> Self[src]

Set the texture mip level.

pub fn set_sample_count(self, sample_count: u32) -> Self[src]

Set the texture sample count.

pub fn set_dimension(self, dimension: TextureDimension) -> Self[src]

Set the texture dimension.

pub fn build(self, device: &Device, renderer: &Renderer) -> Texture[src]

Build a new Texture consuming this config.

Trait Implementations

impl<'a> Clone for TextureConfig<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for TextureConfig<'a>

impl<'a> Send for TextureConfig<'a>

impl<'a> Sync for TextureConfig<'a>

impl<'a> Unpin for TextureConfig<'a>

impl<'a> UnwindSafe for TextureConfig<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,