Enum glin::texture::Format [−][src]
pub enum Format { Texture1D { internal_format: GLenum, width: u32, levels: u32, }, Texture1DArray { internal_format: GLenum, width: u32, layers: u32, levels: u32, }, Texture2D { internal_format: GLenum, width: u32, height: u32, levels: u32, }, Texture2DMultisample { internal_format: GLenum, width: u32, height: u32, samples: u32, }, Texture2DArray { internal_format: GLenum, width: u32, height: u32, layers: u32, levels: u32, }, Texture2DArrayMultisample { internal_format: GLenum, width: u32, height: u32, layers: u32, samples: u32, }, Texture3D { internal_format: GLenum, width: u32, height: u32, depth: u32, levels: u32, }, TextureRectangkle { internal_format: GLenum, width: u32, height: u32, levels: u32, }, Custom { target: GLenum, internal_format: GLenum, width: u32, height: u32, depth: u32, levels: u32, samples: u32, }, }
Use to allocate a new texture
Variants
Show fields
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: GLenum, width: u32, height: u32) -> Format
[src]
pub fn new_multisample(
internal: GLenum,
width: u32,
height: u32,
samples: u32
) -> Format
[src]
internal: GLenum,
width: u32,
height: u32,
samples: u32
) -> Format
pub fn new_3d(internal: GLenum, width: u32, height: u32, depth: u32) -> Format
[src]
pub fn new_1d(internal: GLenum, width: u32) -> Format
[src]
pub fn new_1d_array(internal: GLenum, width: u32, layers: u32) -> Format
[src]
pub fn new_array(
internal: GLenum,
width: u32,
height: u32,
layers: u32
) -> Format
[src]
internal: GLenum,
width: u32,
height: u32,
layers: u32
) -> Format
pub fn new_multisample_array(
internal: GLenum,
width: u32,
height: u32,
layers: u32,
samples: u32
) -> Format
[src]
internal: GLenum,
width: u32,
height: u32,
layers: u32,
samples: u32
) -> Format
pub fn target(&self) -> GLenum
[src]
pub fn internal_format(&self) -> GLenum
[src]
pub fn width(&self) -> GLenum
[src]
pub fn height(&self) -> GLenum
[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) -> GLenum
[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) -> GLenum
[src]
pub fn levels(&self) -> GLenum
[src]
Trait Implementations
impl From<Format> for CompressedDataFormat
[src]
impl From<Format> for CompressedDataFormat
[src]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]