From 0df60c46517648b18e65d860f5a9356ba751ca11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Fri, 19 Aug 2016 15:22:13 +0200 Subject: [core] add ability show visualize the depth buffer to the GLFW and macOS app --- include/mbgl/map/mode.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/mbgl/map') 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 -- cgit v1.2.1