pub struct Dds {
pub header: Header,
pub header10: Option<Header10>,
pub data: Vec<u8>,
}
Expand description
This is the main DirectDraw Surface file structure
Fields§
§header: Header
§header10: Option<Header10>
§data: Vec<u8>
Implementations§
Source§impl Dds
impl Dds
Sourcepub fn new_d3d(params: NewD3dParams) -> Result<Dds, Error>
pub fn new_d3d(params: NewD3dParams) -> Result<Dds, Error>
Create a new DirectDraw Surface with a D3DFormat
Sourcepub fn new_dxgi(params: NewDxgiParams) -> Result<Dds, Error>
pub fn new_dxgi(params: NewDxgiParams) -> Result<Dds, Error>
Create a new DirectDraw Surface with a DxgiFormat
Sourcepub fn get_d3d_format(&self) -> Option<D3DFormat>
pub fn get_d3d_format(&self) -> Option<D3DFormat>
Attempt to get the format of this DDS, presuming it is a D3DFormat.
Sourcepub fn get_dxgi_format(&self) -> Option<DxgiFormat>
pub fn get_dxgi_format(&self) -> Option<DxgiFormat>
Attempt to get the format of this DDS, presuming it is a DxgiFormat.
Sourcepub fn get_format(&self) -> Option<Box<dyn DataFormat>>
pub fn get_format(&self) -> Option<Box<dyn DataFormat>>
Get the format of the DDS as a trait (type-erasure)
pub fn get_width(&self) -> u32
pub fn get_height(&self) -> u32
pub fn get_depth(&self) -> u32
pub fn get_bits_per_pixel(&self) -> Option<u32>
pub fn get_pitch(&self) -> Option<u32>
pub fn get_pitch_height(&self) -> u32
pub fn get_main_texture_size(&self) -> Option<u32>
pub fn get_array_stride(&self) -> Result<u32, Error>
pub fn get_num_array_layers(&self) -> u32
pub fn get_num_mipmap_levels(&self) -> u32
pub fn get_min_mipmap_size_in_bytes(&self) -> u32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dds
impl RefUnwindSafe for Dds
impl Send for Dds
impl Sync for Dds
impl Unpin for Dds
impl UnwindSafe for Dds
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