diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-02-28 11:23:26 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-01 09:33:37 +0100 |
commit | 4982933a78229085ee7a404fded70ad0cf2abc25 (patch) | |
tree | 022c4913aa389782bab7e202550eaf3468650c04 /src/mbgl/gfx | |
parent | fde7c20f36ce2ecfdd79d2722fc2f0bee72e7e99 (diff) | |
download | qtlocation-mapboxgl-4982933a78229085ee7a404fded70ad0cf2abc25.tar.gz |
[core] move DepthMode to gfx namespace
Diffstat (limited to 'src/mbgl/gfx')
-rw-r--r-- | src/mbgl/gfx/depth_mode.hpp | 21 | ||||
-rw-r--r-- | src/mbgl/gfx/types.hpp | 22 |
2 files changed, 40 insertions, 3 deletions
diff --git a/src/mbgl/gfx/depth_mode.hpp b/src/mbgl/gfx/depth_mode.hpp new file mode 100644 index 0000000000..93a13be091 --- /dev/null +++ b/src/mbgl/gfx/depth_mode.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <mbgl/gfx/types.hpp> +#include <mbgl/util/range.hpp> + +namespace mbgl { +namespace gfx { + +class DepthMode { +public: + DepthFunctionType func; + DepthMaskType mask; + Range<float> range; + + static DepthMode disabled() { + return DepthMode { DepthFunctionType::Always, DepthMaskType::ReadOnly, { 0.0, 1.0 } }; + } +}; + +} // namespace gfx +} // namespace mbgl diff --git a/src/mbgl/gfx/types.hpp b/src/mbgl/gfx/types.hpp index adf3395db0..264fa67b04 100644 --- a/src/mbgl/gfx/types.hpp +++ b/src/mbgl/gfx/types.hpp @@ -12,13 +12,13 @@ enum class PrimitiveType : uint8_t { LineStrip, Triangles, TriangleStrip, - TriangleFan + TriangleFan, }; enum class ColorBlendEquationType : uint8_t { Add, Subtract, - ReverseSubtract + ReverseSubtract, }; enum class ColorBlendFactorType : uint8_t { @@ -36,7 +36,23 @@ enum class ColorBlendFactorType : uint8_t { ConstantColor, OneMinusConstantColor, ConstantAlpha, - OneMinusConstantAlpha + OneMinusConstantAlpha, +}; + +enum class DepthFunctionType : uint8_t { + Never, + Less, + Equal, + LessEqual, + Greater, + NotEqual, + GreaterEqual, + Always, +}; + +enum class DepthMaskType : bool { + ReadOnly = false, + ReadWrite = true, }; } // namespace gfx |