1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#![deny(missing_docs)]

//! A Gfx texture representation that works nicely with Piston libraries.

extern crate gfx;
extern crate texture as texture_lib;
extern crate image;

pub use texture_lib::ImageSize;
pub use texture::Texture;

mod texture;

/// Texture creation parameters.
pub struct Settings {
    /// Convert to rgba8.
    pub force_alpha: bool,
    /// Sometimes you need the other way around.
    pub flip_vertical: bool,
    /// Treat as sRGB space.
    pub convert_gamma: bool,
    /// Compress on GPU.
    pub compress: bool,
    /// Generate mipmap chain.
    pub generate_mipmap: bool,
}

impl Settings {
    /// Create default settings.
    pub fn new() -> Settings {
        Settings {
            force_alpha: false,
            flip_vertical: false,
            convert_gamma: false,
            compress: false,
            generate_mipmap: false,
        }
    }
}