Enum glium::texture::InternalFormat
source · pub enum InternalFormat {
OneComponent {
ty1: InternalFormatType,
bits1: usize,
},
TwoComponents {
ty1: InternalFormatType,
bits1: usize,
ty2: InternalFormatType,
bits2: usize,
},
ThreeComponents {
ty1: InternalFormatType,
bits1: usize,
ty2: InternalFormatType,
bits2: usize,
ty3: InternalFormatType,
bits3: usize,
},
FourComponents {
ty1: InternalFormatType,
bits1: usize,
ty2: InternalFormatType,
bits2: usize,
ty3: InternalFormatType,
bits3: usize,
ty4: InternalFormatType,
bits4: usize,
},
}
Expand description
Internal format of a texture.
The actual format of a texture is not necessarily one of the predefined ones, so we have to use a very generic description.
Variants§
OneComponent
Fields
§
ty1: InternalFormatType
Type of the first component of the format.
The format has one component.
TwoComponents
Fields
§
ty1: InternalFormatType
Type of the first component of the format.
§
ty2: InternalFormatType
Type of the second component.
The format has two components.
ThreeComponents
Fields
§
ty1: InternalFormatType
Type of the first component of the format.
§
ty2: InternalFormatType
Type of the second component.
§
ty3: InternalFormatType
Type of the third component.
The format has three components.
FourComponents
Fields
§
ty1: InternalFormatType
Type of the first component of the format.
§
ty2: InternalFormatType
Type of the second component.
§
ty3: InternalFormatType
Type of the third component.
§
ty4: InternalFormatType
Type of the fourth component.
The format has four components.
Implementations§
source§impl InternalFormat
impl InternalFormat
sourcepub fn get_total_bits(&self) -> usize
pub fn get_total_bits(&self) -> usize
Returns the total number of bits of this format.
Trait Implementations§
source§impl Clone for InternalFormat
impl Clone for InternalFormat
source§fn clone(&self) -> InternalFormat
fn clone(&self) -> InternalFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InternalFormat
impl Debug for InternalFormat
source§impl PartialEq<InternalFormat> for InternalFormat
impl PartialEq<InternalFormat> for InternalFormat
source§fn eq(&self, other: &InternalFormat) -> bool
fn eq(&self, other: &InternalFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for InternalFormat
impl Eq for InternalFormat
impl StructuralEq for InternalFormat
impl StructuralPartialEq for InternalFormat
Auto Trait Implementations§
impl RefUnwindSafe for InternalFormat
impl Send for InternalFormat
impl Sync for InternalFormat
impl Unpin for InternalFormat
impl UnwindSafe for InternalFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere T: Copy,
source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>where F: FnOnce(&mut T) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.