Struct gfx::tex::ImageInfoCommon
[−]
[src]
pub struct ImageInfoCommon<F> { pub xoffset: u16, pub yoffset: u16, pub zoffset: u16, pub width: u16, pub height: u16, pub depth: u16, pub format: F, pub mipmap: u8, }
Describes a subvolume of a texture, which image data can be uploaded into.
Fields
xoffset | |
yoffset | |
zoffset | |
width | |
height | |
depth | |
format | Format of each texel. |
mipmap | Which mipmap to select. |
Methods
impl<F> ImageInfoCommon<F>
fn get_texel_count(&self) -> usize
Get the total number of texels.
fn convert<T>(&self, new_format: T) -> ImageInfoCommon<T>
Convert into a differently typed format.
fn is_inside(&self, (u16, u16, u16, AaMode)) -> bool
Check if it fits inside given dimensions.