Struct ddsfile::Dds
[−]
[src]
pub struct Dds { pub header: Header, pub header10: Option<Header10>, pub data: Vec<u8>, }
This is the main DirectDraw Surface file structure
Fields
header: Header
header10: Option<Header10>
data: Vec<u8>
Methods
impl Dds
[src]
fn new_d3d(
height: u32,
width: u32,
depth: Option<u32>,
format: D3DFormat,
mipmap_levels: Option<u32>,
caps2: Option<Caps2>
) -> Result<Dds>
[src]
height: u32,
width: u32,
depth: Option<u32>,
format: D3DFormat,
mipmap_levels: Option<u32>,
caps2: Option<Caps2>
) -> Result<Dds>
Create a new DirectDraw Surface with a D3DFormat
fn new_dxgi(
height: u32,
width: u32,
depth: Option<u32>,
format: DxgiFormat,
mipmap_levels: Option<u32>,
array_layers: Option<u32>,
caps2: Option<Caps2>,
is_cubemap: bool,
resource_dimension: D3D10ResourceDimension,
alpha_mode: AlphaMode
) -> Result<Dds>
[src]
height: u32,
width: u32,
depth: Option<u32>,
format: DxgiFormat,
mipmap_levels: Option<u32>,
array_layers: Option<u32>,
caps2: Option<Caps2>,
is_cubemap: bool,
resource_dimension: D3D10ResourceDimension,
alpha_mode: AlphaMode
) -> Result<Dds>
Create a new DirectDraw Surface with a DxgiFormat
fn read<R: Read>(r: &mut R) -> Result<Dds>
[src]
Read a DDS file
fn write<W: Write>(&self, w: &mut W) -> Result<()>
[src]
Write to a DDS file
fn get_d3d_format(&self) -> Option<D3DFormat>
[src]
Attempt to get the format of this DDS, presuming it is a D3DFormat.
fn get_dxgi_format(&self) -> Option<DxgiFormat>
[src]
Attempt to get the format of this DDS, presuming it is a DxgiFormat.
fn get_format(&self) -> Option<Box<DataFormat>>
[src]
Get the format of the DDS as a trait (type-erasure)
fn get_width(&self) -> u32
[src]
fn get_height(&self) -> u32
[src]
fn get_depth(&self) -> u32
[src]
fn get_bits_per_pixel(&self) -> Option<u32>
[src]
fn get_pitch(&self) -> Option<u32>
[src]
fn get_pitch_height(&self) -> u32
[src]
fn get_main_texture_size(&self) -> Option<u32>
[src]
fn get_array_stride(&self) -> Result<u32>
[src]
fn get_num_array_layers(&self) -> u32
[src]
fn get_num_mipmap_levels(&self) -> u32
[src]
fn get_min_mipmap_size_in_bytes(&self) -> u32
[src]
fn get_data<'a>(&'a self, array_layer: u32) -> Result<&'a [u8]>
[src]
This gets a reference to the data at the given array_layer
(which should be
0 for textures with just one image).
fn get_mut_data<'a>(&'a mut self, array_layer: u32) -> Result<&'a mut [u8]>
[src]
This gets a reference to the data at the given array_layer
(which should be
0 for textures with just one image).