pub struct Header {
pub height: u32,
pub width: u32,
pub pitch: Option<u32>,
pub linear_size: Option<u32>,
pub depth: Option<u32>,
pub mip_map_count: Option<u32>,
pub spf: PixelFormat,
pub caps: Caps,
pub caps2: Caps2,
/* private fields */
}
Fields§
§height: u32
Surface height (in pixels)
width: u32
Surface width (in pixels)
pitch: Option<u32>
The pitch or number of bytes per scan line in an uncompressed texture;
linear_size: Option<u32>
The total number of bytes in a top level texture for a compressed texture
depth: Option<u32>
Depth of a volume texture (in pixels)
mip_map_count: Option<u32>
Number of mipmap levels
spf: PixelFormat
The pixel format
caps: Caps
Specifies the complexity of the surfaces stored.
caps2: Caps2
Additional detail about the surfaces stored
Implementations§
Source§impl Header
impl Header
pub fn new_d3d( height: u32, width: u32, depth: Option<u32>, format: D3DFormat, mipmap_levels: Option<u32>, caps2: Option<Caps2>, ) -> Result<Header, Error>
pub fn new_dxgi( height: u32, width: u32, depth: Option<u32>, format: DxgiFormat, mipmap_levels: Option<u32>, array_layers: Option<u32>, caps2: Option<Caps2>, ) -> Result<Header, Error>
pub fn read<R: Read>(r: R) -> Result<Header, Error>
pub fn write<W: Write>(&self, w: &mut W) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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