diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/gl/context.cpp | 13 | ||||
-rw-r--r-- | src/mbgl/gl/context.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/renderer/renderer_impl.cpp | 4 |
3 files changed, 6 insertions, 14 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index e04f134f39..a4f9cead0e 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -590,33 +590,28 @@ void Context::setDirtyState() { void Context::clear(optional<mbgl::Color> color, optional<float> depth, - optional<int32_t> stencil, - optional<ColorMode::Mask> colorMask_) { + optional<int32_t> stencil) { GLbitfield mask = 0; if (color) { mask |= GL_COLOR_BUFFER_BIT; clearColor = *color; - colorMask = colorMask_ ? *colorMask_ : value::ColorMask::Default; + colorMask = value::ColorMask::Default; } if (depth) { mask |= GL_DEPTH_BUFFER_BIT; clearDepth = *depth; - depthMask = true; + depthMask = value::DepthMask::Default; } if (stencil) { mask |= GL_STENCIL_BUFFER_BIT; clearStencil = *stencil; - stencilMask = 0xFF; + stencilMask = value::StencilMask::Default; } MBGL_CHECK_ERROR(glClear(mask)); - - if (colorMask_) { - colorMask = value::ColorMask::Default; - } } #if not MBGL_USE_GLES2 diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index 2d650e7ecb..528113cbba 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -146,8 +146,7 @@ public: void clear(optional<mbgl::Color> color, optional<float> depth, - optional<int32_t> stencil, - optional<ColorMode::Mask> colorMask = value::ColorMask::Default); + optional<int32_t> stencil); void setDrawMode(const Points&); void setDrawMode(const Lines&); diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index d7886ebe88..9ff5a3b6dd 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -443,9 +443,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { if (parameters.debugOptions & MapDebugOptions::Overdraw) { parameters.context.clear(Color::black(), ClearDepth::Default, ClearStencil::Default); } else if (parameters.contextMode == GLContextMode::Shared) { - // Preserve the shared context background colors, clearing only alpha. - optional<gl::ColorMode::Mask> mask = { { false, false, false, true } }; - parameters.context.clear(backgroundColor, ClearDepth::Default, ClearStencil::Default, mask); + parameters.context.clear({}, ClearDepth::Default, ClearStencil::Default); } else { parameters.context.clear(backgroundColor, ClearDepth::Default, ClearStencil::Default); } |