summaryrefslogtreecommitdiff
path: root/engine/src/opengl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/opengl/mod.rs')
-rw-r--r--engine/src/opengl/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/engine/src/opengl/mod.rs b/engine/src/opengl/mod.rs
index 6f95a1f..4f4f96f 100644
--- a/engine/src/opengl/mod.rs
+++ b/engine/src/opengl/mod.rs
@@ -33,6 +33,13 @@ pub fn clear_buffers(mask: BufferClearMask)
}
}
+pub fn enable(capacity: Capability)
+{
+ unsafe {
+ gl::Enable(capacity as u32);
+ }
+}
+
bitflags! {
#[derive(Debug, Clone, Copy)]
pub struct BufferClearMask: u32 {
@@ -41,3 +48,10 @@ bitflags! {
const STENCIL = gl::STENCIL_BUFFER_BIT;
}
}
+
+#[derive(Debug)]
+#[repr(u32)]
+pub enum Capability
+{
+ DepthTest = gl::DEPTH_TEST,
+}