summaryrefslogtreecommitdiff
path: root/engine/src/opengl/mod.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-10-25 20:31:56 +0200
committerHampusM <hampus@hampusmat.com>2023-10-25 20:32:00 +0200
commit47798568f3f05b8267ae3700369a4a396073ef97 (patch)
tree9219faefd05f2a4c659e5b51c69740c9ecf60929 /engine/src/opengl/mod.rs
parent3d0de3f951ec2da7a2d41c6958d0d3583a7832a0 (diff)
feat(engine): enable depth testing
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,
+}