Skip to main content

ImageDesc

Struct ImageDesc 

Source
pub struct ImageDesc<'a> {
    pub extent: ImageExtent,
    pub format: PixelFormat,
    pub layers: u32,
    pub levels: u32,
    pub usage: ImageUsage,
    pub name: &'a str,
}
Expand description

Description used for image creation.

Fields§

§extent: ImageExtent

Image extent.

§format: PixelFormat

Image pixel format.

§layers: u32

Image layers count.

§levels: u32

Image mip levels count.

§usage: ImageUsage

Image usage flags.

§name: &'a str

Image debug name.

Implementations§

Source§

impl<'a> ImageDesc<'a>

Source

pub const fn new( extent: ImageExtent, format: PixelFormat, usage: ImageUsage, ) -> Self

Create a new image description.

Source

pub const fn new_d1(width: u32, format: PixelFormat, usage: ImageUsage) -> Self

Create a new 1D image description.

Source

pub const fn new_d2( width: u32, height: u32, format: PixelFormat, usage: ImageUsage, ) -> Self

Create a new 2D image description.

Source

pub const fn new_d3( width: u32, height: u32, depth: u32, format: PixelFormat, usage: ImageUsage, ) -> Self

Create a new 3D image description.

Source

pub fn layers(self, layers: u32) -> Self

Set image layers count.

Source

pub fn levels(self, levels: u32) -> Self

Set image mip levels count.

Source

pub const fn new_d1_texture(width: u32, format: PixelFormat) -> Self

Create a new 1D texture description.

Source

pub const fn new_d2_texture( width: u32, height: u32, format: PixelFormat, ) -> Self

Create a new 2D texture description.

Source

pub const fn new_d3_texture( width: u32, height: u32, depth: u32, format: PixelFormat, ) -> Self

Create a new 3D texture description.

Source

pub const fn new_d1_rt(width: u32, format: PixelFormat) -> Self

Create a new 1D render target description.

Source

pub const fn new_d2_rt(width: u32, height: u32, format: PixelFormat) -> Self

Create a new 2D render target description.

Source

pub const fn new_d3_rt( width: u32, height: u32, depth: u32, format: PixelFormat, ) -> Self

Create a new 3D render target description.

Source

pub const fn with_name(self, name: &'a str) -> Self

Set image debug name.

Auto Trait Implementations§

§

impl<'a> Freeze for ImageDesc<'a>

§

impl<'a> RefUnwindSafe for ImageDesc<'a>

§

impl<'a> Send for ImageDesc<'a>

§

impl<'a> Sync for ImageDesc<'a>

§

impl<'a> Unpin for ImageDesc<'a>

§

impl<'a> UnsafeUnpin for ImageDesc<'a>

§

impl<'a> UnwindSafe for ImageDesc<'a>

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more