Struct rin::gl::texture::DataFormat [−][src]
pub struct DataFormat { pub width: u32, pub height: u32, pub depth: u32, pub format: u32, pub ty: u32, pub level: u32, pub xoffset: i32, pub yoffset: i32, pub zoffset: i32, }
Used to upload data to a Texture
DataFormat
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 DataFormat::default()
If some fields are not the same the rest can be defaulted by using ..Default::default()
as in
use glin::texture::DataFormat; texture.load_data(&data, DataFormat{ width: 20, height: 20, xoffset: 20, yoffset: 20, level: 1, ..Default::default() });
Fields
width: u32
height: u32
depth: u32
format: u32
ty: u32
level: u32
xoffset: i32
yoffset: i32
zoffset: i32
Implementations
impl DataFormat
[src]
impl DataFormat
[src]Trait Implementations
impl Clone for DataFormat
[src]
impl Clone for DataFormat
[src]pub fn clone(&self) -> DataFormat
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for DataFormat
[src]
impl Default for DataFormat
[src]pub fn default() -> DataFormat
[src]
impl Hash for DataFormat
[src]
impl Hash for DataFormat
[src]impl PartialEq<DataFormat> for DataFormat
[src]
impl PartialEq<DataFormat> for DataFormat
[src]pub fn eq(&self, other: &DataFormat) -> bool
[src]
pub fn ne(&self, other: &DataFormat) -> bool
[src]
impl TryFrom<Format> for DataFormat
[src]
impl TryFrom<Format> for DataFormat
[src]impl Eq for DataFormat
[src]
impl StructuralEq for DataFormat
[src]
impl StructuralPartialEq for DataFormat
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataFormat
impl Send for DataFormat
impl Sync for DataFormat
impl Unpin for DataFormat
impl UnwindSafe for DataFormat
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]