Struct glin::texture::CompressedDataFormat [−][src]
pub struct CompressedDataFormat {
pub width: u32,
pub height: u32,
pub depth: u32,
pub format: GLenum,
pub level: u32,
pub xoffset: i32,
pub yoffset: i32,
pub zoffset: i32,
}Used to upload compressed data to a texture
format has to be the same as the internal_format used while allocating the texture
CompressedDataFormat implements Default so when uploading data to a texture where the data and the
texture ahve the same size, format and type and the data is going to be uploaded to level 0
a Default DataFormat can be used by calling Default::default() or CompressedDataFormat::default()
If some fields are not the same the rest can be defaulted by using ..Default::default() as in
use glin::texture::CompressedDataFormat; texture.load_data(&data, CompressedDataFormat{ width: 20, height: 20, xoffset: 20, yoffset: 20, ..Default::default() });
Fields
width: u32height: u32depth: u32format: GLenumlevel: u32xoffset: i32yoffset: i32zoffset: i32Trait Implementations
impl Clone for CompressedDataFormat[src]
impl Clone for CompressedDataFormat[src]fn clone(&self) -> CompressedDataFormat[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Default for CompressedDataFormat[src]
impl Default for CompressedDataFormat[src]fn default() -> CompressedDataFormat[src]
impl From<Format> for CompressedDataFormat[src]
impl From<Format> for CompressedDataFormat[src]fn from(texture_format: Format) -> CompressedDataFormat[src]
impl Hash for CompressedDataFormat[src]
impl Hash for CompressedDataFormat[src]impl PartialEq<CompressedDataFormat> for CompressedDataFormat[src]
impl PartialEq<CompressedDataFormat> for CompressedDataFormat[src]