[−][src]Struct ddsfile::Dds
This is the main DirectDraw Surface file structure
Fields
header: Header
header10: Option<Header10>
data: Vec<u8>
Methods
impl Dds
[src]
pub fn new_d3d(
height: u32,
width: u32,
depth: Option<u32>,
format: D3DFormat,
mipmap_levels: Option<u32>,
caps2: Option<Caps2>
) -> Result<Dds, Error>
[src]
height: u32,
width: u32,
depth: Option<u32>,
format: D3DFormat,
mipmap_levels: Option<u32>,
caps2: Option<Caps2>
) -> Result<Dds, Error>
Create a new DirectDraw Surface with a D3DFormat
pub 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, Error>
[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, Error>
Create a new DirectDraw Surface with a DxgiFormat
pub fn read<R: Read>(r: &mut R) -> Result<Dds, Error>
[src]
Read a DDS file
pub fn write<W: Write>(&self, w: &mut W) -> Result<(), Error>
[src]
Write to a DDS file
pub fn get_d3d_format(&self) -> Option<D3DFormat>
[src]
Attempt to get the format of this DDS, presuming it is a D3DFormat.
pub fn get_dxgi_format(&self) -> Option<DxgiFormat>
[src]
Attempt to get the format of this DDS, presuming it is a DxgiFormat.
pub fn get_format(&self) -> Option<Box<dyn DataFormat>>
[src]
Get the format of the DDS as a trait (type-erasure)
pub fn get_width(&self) -> u32
[src]
pub fn get_height(&self) -> u32
[src]
pub fn get_depth(&self) -> u32
[src]
pub fn get_bits_per_pixel(&self) -> Option<u32>
[src]
pub fn get_pitch(&self) -> Option<u32>
[src]
pub fn get_pitch_height(&self) -> u32
[src]
pub fn get_main_texture_size(&self) -> Option<u32>
[src]
pub fn get_array_stride(&self) -> Result<u32, Error>
[src]
pub fn get_num_array_layers(&self) -> u32
[src]
pub fn get_num_mipmap_levels(&self) -> u32
[src]
pub fn get_min_mipmap_size_in_bytes(&self) -> u32
[src]
pub fn get_data<'a>(&'a self, array_layer: u32) -> Result<&'a [u8], Error>
[src]
This gets a reference to the data at the given array_layer
(which should be
0 for textures with just one image).
pub fn get_mut_data<'a>(
&'a mut self,
array_layer: u32
) -> Result<&'a mut [u8], Error>
[src]
&'a mut self,
array_layer: u32
) -> Result<&'a mut [u8], Error>
This gets a reference to the data at the given array_layer
(which should be
0 for textures with just one image).
Trait Implementations
Auto Trait Implementations
impl Send for Dds
impl Sync for Dds
impl Unpin for Dds
impl UnwindSafe for Dds
impl RefUnwindSafe for Dds
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,