Struct gfx_core::tex::ImageInfoCommon
[−]
[src]
pub struct ImageInfoCommon<F> { pub xoffset: Size, pub yoffset: Size, pub zoffset: Size, pub width: Size, pub height: Size, pub depth: Size, pub format: F, pub mipmap: Level, }
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, (w, h, d, aa): Dimensions) -> bool
Check if it fits inside given dimensions.