Enum gfx::tex::Kind
[−]
[src]
pub enum Kind { D1(u16), D1Array(u16, u16), D2(u16, u16, AaMode), D2Array(u16, u16, u16, AaMode), D3(u16, u16, u16), Cube(u16), CubeArray(u16, u16), }
Specifies the kind of a texture storage to be allocated.
Variants
D1 | A single row of texels. | |
D1Array | An array of rows of texels. Equivalent to Texture2D except that texels in a different row are not sampled. | |
D2 | A traditional 2D texture, with rows arranged contiguously. | |
D2Array | An array of 2D textures. Equivalent to Texture3D except that texels in a different depth level are not sampled. | |
D3 | A volume texture, with each 2D layer arranged contiguously. | |
Cube | A set of 6 2D textures, one for each face of a cube. | |
CubeArray | An array of Cube textures. |
Methods
impl Kind
fn get_dimensions(&self) -> (u16, u16, u16, AaMode)
Get texture dimensions, with 0 values where not applicable.
fn get_level_dimensions(&self, level: u8) -> (u16, u16, u16, AaMode)
Get the dimensionality of a particular mipmap level.
fn get_num_levels(&self) -> u8
Count the number of mipmap levels.
fn get_num_slices(&self) -> Option<u16>
Return the number of slices for an array, or None for non-arrays.
fn is_cube(&self) -> bool
Check if it's one of the cube kinds.