[−][src]Enum nvtt_rs::TextureLayout
Describes the layout of the input texture data.
Variants
The texture is a standard 2D image with a width and a height.
Fields of D2
The texture is a 3D texture, with a width, height and depth.
Fields of D3
The texture is an array of 2D textures.
Fields of Array
The texture is a cube texture comprised of 6 2D textures for each face of the cube.
Fields of Cube
Implementations
impl TextureLayout
[src]
pub const fn d2(width: usize, height: usize) -> Self
[src]
Construct a new TextureLayout::D2
from the given width
and height
.
pub const fn d3(width: usize, height: usize, depth: usize) -> Self
[src]
Construct a new TextureLayout::D3
from the given width
, height
and depth
.
pub const fn array(width: usize, height: usize, array_length: usize) -> Self
[src]
Construct a new TextureLayout::Array
from the given width
, height
and
array_length
.
pub const fn cube(face_width: usize, face_height: usize) -> Self
[src]
Construct a new TextureLayout::Cube
from the given face_width
and face_height
.
pub fn texture_type(&self) -> TextureType
[src]
Get the TextureType
corresponding to this TextureLayout
.
Trait Implementations
impl Clone for TextureLayout
[src]
fn clone(&self) -> TextureLayout
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TextureLayout
[src]
impl Debug for TextureLayout
[src]
impl Eq for TextureLayout
[src]
impl Hash for TextureLayout
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TextureLayout> for TextureLayout
[src]
fn eq(&self, other: &TextureLayout) -> bool
[src]
fn ne(&self, other: &TextureLayout) -> bool
[src]
impl StructuralEq for TextureLayout
[src]
impl StructuralPartialEq for TextureLayout
[src]
Auto Trait Implementations
impl RefUnwindSafe for TextureLayout
impl Send for TextureLayout
impl Sync for TextureLayout
impl Unpin for TextureLayout
impl UnwindSafe for TextureLayout
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,