Remove some boolean flags in tex_image_2d and tex_sub_image_2d

This commit is contained in:
Anthony Ramine 2018-11-15 15:22:05 +01:00
parent 3f8a3b2887
commit 947e5afa0c
2 changed files with 89 additions and 30 deletions

View file

@ -757,6 +757,24 @@ impl TexDataType {
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
pub enum AlphaTreatment {
Premultiply,
Unmultiply,
}
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
pub enum YAxisTreatment {
AsIs,
Flipped,
}
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
pub enum TexSource {
FromHtmlElement,
FromArray,
}
/// Translates an image in rgba8 (red in the first byte) format to
/// the format that was requested of TexImage.
pub fn rgba8_image_to_tex_image_data(