Enum rin::gl::texture::Format[][src]

pub enum Format {
    Texture1D {
        internal_format: u32,
        width: u32,
        levels: u32,
    },
    Texture1DArray {
        internal_format: u32,
        width: u32,
        layers: u32,
        levels: u32,
    },
    Texture2D {
        internal_format: u32,
        width: u32,
        height: u32,
        levels: u32,
    },
    Texture2DMultisample {
        internal_format: u32,
        width: u32,
        height: u32,
        samples: u32,
    },
    Texture2DArray {
        internal_format: u32,
        width: u32,
        height: u32,
        layers: u32,
        levels: u32,
    },
    Texture2DArrayMultisample {
        internal_format: u32,
        width: u32,
        height: u32,
        layers: u32,
        samples: u32,
    },
    Texture3D {
        internal_format: u32,
        width: u32,
        height: u32,
        depth: u32,
        levels: u32,
    },
    TextureRectangkle {
        internal_format: u32,
        width: u32,
        height: u32,
        levels: u32,
    },
    Custom {
        target: u32,
        internal_format: u32,
        width: u32,
        height: u32,
        depth: u32,
        levels: u32,
        samples: u32,
    },
}

Use to allocate a new texture

Variants

Texture1D
Show fields

Fields of Texture1D

internal_format: u32width: u32levels: u32
Texture1DArray
Show fields

Fields of Texture1DArray

internal_format: u32width: u32layers: u32levels: u32
Texture2D
Show fields

Fields of Texture2D

internal_format: u32width: u32height: u32levels: u32
Texture2DMultisample
Show fields

Fields of Texture2DMultisample

internal_format: u32width: u32height: u32samples: u32
Texture2DArray
Show fields

Fields of Texture2DArray

internal_format: u32width: u32height: u32layers: u32levels: u32
Texture2DArrayMultisample
Show fields

Fields of Texture2DArrayMultisample

internal_format: u32width: u32height: u32layers: u32samples: u32
Texture3D
Show fields

Fields of Texture3D

internal_format: u32width: u32height: u32depth: u32levels: u32
TextureRectangkle
Show fields

Fields of TextureRectangkle

internal_format: u32width: u32height: u32levels: u32
Custom

Custom format for special targets.

Non used dimensions need to be 0 otherwise the wrong functions might be called

For example a 1D texture needs height and depth to be 0 and a 2D texture needs depth to be 0 When width, height and depth are non zero glin will internally use the gl3D functions for this texture If width and height are non zero and depth is 0 glin will internally use the gl2D functions

Show fields

Fields of Custom

target: u32internal_format: u32width: u32height: u32depth: u32levels: u32samples: u32

Implementations

impl Format[src]

pub fn new(internal: u32, width: u32, height: u32) -> Format[src]

pub fn new_multisample(
    internal: u32,
    width: u32,
    height: u32,
    samples: u32
) -> Format
[src]

pub fn new_3d(internal: u32, width: u32, height: u32, depth: u32) -> Format[src]

pub fn new_1d(internal: u32, width: u32) -> Format[src]

pub fn new_1d_array(internal: u32, width: u32, layers: u32) -> Format[src]

pub fn new_array(internal: u32, width: u32, height: u32, layers: u32) -> Format[src]

pub fn new_multisample_array(
    internal: u32,
    width: u32,
    height: u32,
    layers: u32,
    samples: u32
) -> Format
[src]

pub fn target(&self) -> u32[src]

pub fn internal_format(&self) -> u32[src]

pub fn width(&self) -> u32[src]

pub fn height(&self) -> u32[src]

As used by gl functions

For example for 1D arrays this will return the number of layers as used when uploading data using glTextureSubImage2D

pub fn depth(&self) -> u32[src]

As used by gl functions

For example for 2D arrays this will return the number of layers as used when uploading data using glTextureSubImage3D

pub fn samples(&self) -> u32[src]

pub fn levels(&self) -> u32[src]

Trait Implementations

impl Clone for Format[src]

impl Debug for Format[src]

impl From<Format> for CompressedDataFormat[src]

impl Hash for Format[src]

impl PartialEq<Format> for Format[src]

impl TryFrom<Format> for LoadDataFormat[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Format> for DataFormat[src]

type Error = Error

The type returned in the event of a conversion error.

impl Eq for Format[src]

impl StructuralEq for Format[src]

impl StructuralPartialEq for Format[src]

Auto Trait Implementations

impl RefUnwindSafe for Format

impl Send for Format

impl Sync for Format

impl Unpin for Format

impl UnwindSafe for Format

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> CallHasher for T where
    T: Hash
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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>, 
[src]