Trait MipmapSize

Source
pub trait MipmapSize<T> {
    // Required methods
    fn calculate_miplevels(self) -> T;
    fn scale_mipmap(self, miplevel: T) -> Size<T>;
}
Expand description

Trait for size scaling relating to mipmap generation.

Required Methods§

Source

fn calculate_miplevels(self) -> T

Calculate the number of mipmap levels for a given size.

Source

fn scale_mipmap(self, miplevel: T) -> Size<T>

Scale the size according to the given mipmap level. The size will at minimum be 1x1, and at a maximum 16384x16384.

Implementations on Foreign Types§

Source§

impl MipmapSize<u32> for Size<u32>

Source§

fn calculate_miplevels(self) -> u32

Source§

fn scale_mipmap(self, miplevel: u32) -> Size<u32>

Implementors§