summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-09-07 12:21:22 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-09-08 08:30:10 -0700
commitb05e5ddd347a9362535ca33cefceae92c51c998f (patch)
treebb7152984220b7f522611a177750fae0556cdc58 /src
parentf8a53234ffa6ff3fd1d8fc8e3aa8b10b16c815fd (diff)
downloadqtlocation-mapboxgl-b05e5ddd347a9362535ca33cefceae92c51c998f.tar.gz
[core] Fix z-fighting of translucent fills
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/layers/render_fill_layer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/renderer/layers/render_fill_layer.cpp b/src/mbgl/renderer/layers/render_fill_layer.cpp
index 394642a50d..22cb9563c1 100644
--- a/src/mbgl/renderer/layers/render_fill_layer.cpp
+++ b/src/mbgl/renderer/layers/render_fill_layer.cpp
@@ -99,7 +99,9 @@ void RenderFillLayer::render(PaintParameters& parameters, RenderSource*) {
&& evaluated.get<FillOpacity>().constantOr(0) >= 1.0f) == (parameters.pass == RenderPass::Opaque)) {
draw(parameters.programs.fill,
gl::Triangles(),
- parameters.depthModeForSublayer(1, gl::DepthMode::ReadWrite),
+ parameters.depthModeForSublayer(1, parameters.pass == RenderPass::Opaque
+ ? gl::DepthMode::ReadWrite
+ : gl::DepthMode::ReadOnly),
*bucket.triangleIndexBuffer,
bucket.triangleSegments);
}