Enum ddsfile::D3DFormat
[−]
[src]
pub enum D3DFormat { A8B8G8R8, G16R16, A2B10G10R10, A1R5G5B5, R5G6B5, A8, A8R8G8B8, X8R8G8B8, X8B8G8R8, A2R10G10B10, R8G8B8, X1R5G5B5, A4R4G4B4, X4R4G4B4, A8R3G3B2, A8L8, L16, L8, A4L4, DXT1, DXT3, DXT5, R8G8_B8G8, G8R8_G8B8, A16B16G16R16, Q16W16V16U16, R16F, G16R16F, A16B16G16R16F, R32F, G32R32F, A32B32G32R32F, DXT2, DXT4, UYVY, YUY2, CXV8U8, }
Variants
A8B8G8R8
G16R16
A2B10G10R10
A1R5G5B5
R5G6B5
A8
A8R8G8B8
X8R8G8B8
X8B8G8R8
A2R10G10B10
R8G8B8
X1R5G5B5
A4R4G4B4
X4R4G4B4
A8R3G3B2
A8L8
L16
L8
A4L4
DXT1
DXT3
DXT5
R8G8_B8G8
G8R8_G8B8
A16B16G16R16
Q16W16V16U16
R16F
G16R16F
A16B16G16R16F
R32F
G32R32F
A32B32G32R32F
DXT2
DXT4
UYVY
YUY2
CXV8U8
Methods
impl D3DFormat
[src]
fn r_bit_mask(&self) -> Option<u32>
[src]
This gets the bitmask for the red channel pixels
fn g_bit_mask(&self) -> Option<u32>
[src]
This gets the bitmask for the green channel pixels
fn b_bit_mask(&self) -> Option<u32>
[src]
This gets the bitmask for the blue channel pixels
fn a_bit_mask(&self) -> Option<u32>
[src]
This gets the bitmask for the alpha channel pixels
fn try_from_pixel_format(pixel_format: &PixelFormat) -> Option<D3DFormat>
[src]
This attempts to use PixelFormat
data (e.g. from the dds.header.spf field)
to determine the D3DFormat
.
Trait Implementations
impl Debug for D3DFormat
[src]
impl Clone for D3DFormat
[src]
fn clone(&self) -> D3DFormat
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for D3DFormat
[src]
impl PartialEq for D3DFormat
[src]
fn eq(&self, __arg_0: &D3DFormat) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for D3DFormat
[src]
impl Hash for D3DFormat
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl DataFormat for D3DFormat
[src]
fn get_pitch(&self, width: u32) -> Option<u32>
[src]
This gets the number of bytes required to store one row of data
fn get_bits_per_pixel(&self) -> Option<u8>
[src]
This gets the number of bits required to store a single pixel. It is only defined for uncompressed formats Read more
fn get_block_size(&self) -> Option<u32>
[src]
This gets a block compression format's block size, and is only defined for compressed formats Read more
fn get_fourcc(&self) -> Option<FourCC>
[src]
Get the fourcc code for this format, if known
fn requires_extension(&self) -> bool
[src]
Returns true if the DX10 extention is required to use this format.
fn get_pitch_height(&self) -> u32
[src]
This gets the height of each row of data. Normally it is 1, but for block compressed textures, each row is 4 pixels high. Read more
fn get_minimum_mipmap_size_in_bytes(&self) -> Option<u32>
[src]
This gets the minimum mipmap size in bytes. Even if they go all the way down to 1x1, there is a minimum number of bytes based on bits per pixel or blocksize. Read more