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
Show fields
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
Implementations
impl Format[src]
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]
internal: u32,
width: u32,
height: u32,
samples: u32
) -> Format
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]
internal: u32,
width: u32,
height: u32,
layers: u32,
samples: u32
) -> Format
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 From<Format> for CompressedDataFormat[src]
impl From<Format> for CompressedDataFormat[src]pub fn from(texture_format: Format) -> CompressedDataFormat[src]
impl TryFrom<Format> for LoadDataFormat[src]
impl TryFrom<Format> for LoadDataFormat[src]impl TryFrom<Format> for DataFormat[src]
impl TryFrom<Format> for DataFormat[src]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> CallHasher for T where
T: Hash, [src]
impl<T> CallHasher for T where
T: Hash, [src]impl<T> DowncastSync for T where
T: Any + Send + Sync, [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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]pub fn to_subset(&self) -> Option<SS>[src]
pub fn is_in_subset(&self) -> bool[src]
pub fn to_subset_unchecked(&self) -> SS[src]
pub fn from_subset(element: &SS) -> SP[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]