summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/depth_mode.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-26 12:53:32 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-28 17:14:01 -0700
commit0e57d10d77e555a9229f7d522d83f87df7d5180d (patch)
tree2a3c3b0dd4ed6edf385ba8d390d919e469b7a96a /src/mbgl/gl/depth_mode.hpp
parenta4c82b8a3b5e48f3bbccf32be80d45ca78d51515 (diff)
downloadqtlocation-mapboxgl-0e57d10d77e555a9229f7d522d83f87df7d5180d.tar.gz
[core] Modern C++ bindings for OpenGL
Diffstat (limited to 'src/mbgl/gl/depth_mode.hpp')
-rw-r--r--src/mbgl/gl/depth_mode.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mbgl/gl/depth_mode.hpp b/src/mbgl/gl/depth_mode.hpp
new file mode 100644
index 0000000000..37617e3c34
--- /dev/null
+++ b/src/mbgl/gl/depth_mode.hpp
@@ -0,0 +1,36 @@
+#pragma once
+
+#include <mbgl/util/range.hpp>
+
+namespace mbgl {
+namespace gl {
+
+class DepthMode {
+public:
+ enum Function {
+ Never = 0x0200,
+ Less = 0x0201,
+ Equal = 0x0202,
+ LessEqual = 0x0203,
+ Greater = 0x0204,
+ NotEqual = 0x0205,
+ GreaterEqual = 0x0206,
+ Always = 0x0207
+ };
+
+ enum Mask : bool {
+ ReadOnly = false,
+ ReadWrite = true
+ };
+
+ Function func;
+ Mask mask;
+ Range<float> range;
+
+ static DepthMode disabled() {
+ return DepthMode { Always, ReadOnly, { 0.0, 1.0 } };
+ }
+};
+
+} // namespace gl
+} // namespace mbgl