diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-08-19 15:22:13 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-08-19 17:41:55 +0200 |
commit | 0df60c46517648b18e65d860f5a9356ba751ca11 (patch) | |
tree | fbe895bed6aaac9f65ee095a48e1b12e10af5b3b /include | |
parent | cb33c861b4cfa82d7afcb5b9ec85d7797679a7d8 (diff) | |
download | qtlocation-mapboxgl-0df60c46517648b18e65d860f5a9356ba751ca11.tar.gz |
[core] add ability show visualize the depth buffer to the GLFW and macOS app
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/mode.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/mbgl/map/mode.hpp b/include/mbgl/map/mode.hpp index c9b9f60953..2efc8b18e0 100644 --- a/include/mbgl/map/mode.hpp +++ b/include/mbgl/map/mode.hpp @@ -47,6 +47,7 @@ enum class MapDebugOptions : EnumType { // FIXME: https://github.com/mapbox/mapbox-gl-native/issues/5117 #ifndef GL_ES_VERSION_2_0 StencilClip = 1 << 6, + DepthBuffer = 1 << 7, #endif // GL_ES_VERSION_2_0 }; @@ -55,11 +56,19 @@ constexpr MapDebugOptions operator|(MapDebugOptions lhs, MapDebugOptions rhs) { } constexpr MapDebugOptions& operator|=(MapDebugOptions& lhs, MapDebugOptions rhs) { - return (lhs = lhs | rhs); + return (lhs = MapDebugOptions(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs))); } constexpr bool operator&(MapDebugOptions lhs, MapDebugOptions rhs) { return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs); } +constexpr MapDebugOptions& operator&=(MapDebugOptions& lhs, MapDebugOptions rhs) { + return (lhs = MapDebugOptions(mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs))); +} + +constexpr MapDebugOptions operator~(MapDebugOptions value) { + return MapDebugOptions(~mbgl::underlying_type(value)); +} + } // namespace mbgl |