Struct gfx::device::tex::TextureInfo
[−]
[src]
pub struct TextureInfo {
pub width: Size,
pub height: Size,
pub depth: Size,
pub levels: u8,
pub kind: TextureKind,
pub format: Format,
}Describes the storage of a texture.
Portability note
Textures larger than 1024px in any dimension are unlikely to be supported by mobile platforms.
Fields
width | |
height | |
depth | |
levels | Number of mipmap levels. Defaults to -1, which stands for unlimited.
Mipmap levels at equal or above |
kind | |
format |
Methods
impl TextureInfo
fn new() -> TextureInfo
Create a new empty texture info.
fn to_image_info(&self) -> ImageInfo
Convert to a default ImageInfo that could be used to update the contents of the whole texture.
fn to_surface_info(&self) -> SurfaceInfo
Convert to a SurfaceInfo, used as a common denominator between
surfaces and textures.
fn contains(&self, img: &ImageInfo) -> bool
Check if given ImageInfo is a part of the texture.