[][src]Trait ddsfile::DataFormat

pub trait DataFormat {
    fn get_pitch(&self, width: u32) -> Option<u32>;
fn get_bits_per_pixel(&self) -> Option<u8>;
fn get_block_size(&self) -> Option<u32>;
fn get_fourcc(&self) -> Option<FourCC>;
fn requires_extension(&self) -> bool; fn get_pitch_height(&self) -> u32 { ... }
fn get_minimum_mipmap_size_in_bytes(&self) -> Option<u32> { ... } }

Required methods

fn get_pitch(&self, width: u32) -> Option<u32>

This gets the number of bytes required to store one row of data

fn get_bits_per_pixel(&self) -> Option<u8>

This gets the number of bits required to store a single pixel. It is only defined for uncompressed formats

fn get_block_size(&self) -> Option<u32>

This gets a block compression format's block size, and is only defined for compressed formats

fn get_fourcc(&self) -> Option<FourCC>

Get the fourcc code for this format, if known

fn requires_extension(&self) -> bool

Returns true if the DX10 extention is required to use this format.

Loading content...

Provided methods

fn get_pitch_height(&self) -> u32

This gets the height of each row of data. Normally it is 1, but for block compressed textures, each row is 4 pixels high.

fn get_minimum_mipmap_size_in_bytes(&self) -> Option<u32>

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.

Loading content...


impl DataFormat for D3DFormat[src]

impl DataFormat for DxgiFormat[src]

Loading content...