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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#[allow(non_upper_case_globals)]
#[doc(hidden)]
#[cfg_attr(feature = "cargo-clippy", allow(clippy))]
pub mod gl {
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
}
mod errors;
pub use self::errors::get_error;
mod buffer;
pub use self::buffer::*;
mod compute;
pub use self::compute::*;
mod shader;
pub use self::shader::*;
mod program;
pub use self::program::*;
mod shader_program;
pub use self::shader_program::*;
mod pipeline;
pub use self::pipeline::*;
mod texture;
pub use self::texture::*;
mod image;
pub use self::image::*;
mod framebuffer;
pub use self::framebuffer::*;
mod sync;
pub use self::sync::*;
mod state;
pub use self::state::*;
mod get;
pub use self::get::*;
mod draw;
pub use self::draw::*;
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Face {
Front,
Back,
FrontBack,
}
impl From<Face> for u32 {
fn from(face: Face) -> Self {
match face {
Face::Front => gl::FRONT,
Face::Back => gl::BACK,
Face::FrontBack => gl::FRONT_AND_BACK,
}
}
}
impl Default for Face {
fn default() -> Face {
Face::Back
}
}