|
|
@@ -29,6 +29,10 @@ impl BufferId {
|
|
29
|
29
|
|
|
30
|
30
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
|
31
|
31
|
pub enum DrawMode {
|
|
|
32
|
+ Points,
|
|
|
33
|
+ Lines,
|
|
|
34
|
+ LineStrip,
|
|
|
35
|
+ LineLoop,
|
|
32
|
36
|
Triangles,
|
|
33
|
37
|
TriangleStrip,
|
|
34
|
38
|
TriangleFan,
|
|
|
@@ -37,6 +41,10 @@ pub enum DrawMode {
|
|
37
|
41
|
impl DrawMode {
|
|
38
|
42
|
pub fn to_gl_enum(self) -> u32 {
|
|
39
|
43
|
match self {
|
|
|
44
|
+ DrawMode::Points => context::gl::POINTS,
|
|
|
45
|
+ DrawMode::Lines => context::gl::LINES,
|
|
|
46
|
+ DrawMode::LineStrip => context::gl::LINE_STRIP,
|
|
|
47
|
+ DrawMode::LineLoop => context::gl::LINE_LOOP,
|
|
40
|
48
|
DrawMode::Triangles => context::gl::TRIANGLES,
|
|
41
|
49
|
DrawMode::TriangleStrip => context::gl::TRIANGLE_STRIP,
|
|
42
|
50
|
DrawMode::TriangleFan => context::gl::TRIANGLE_FAN,
|