diff --git a/src/gl/context.js b/src/gl/context.js index 8c183868d65..a21987d7f79 100644 --- a/src/gl/context.js +++ b/src/gl/context.js @@ -189,6 +189,11 @@ class Context { if (typeof depth !== 'undefined') { mask |= gl.DEPTH_BUFFER_BIT; + + // Workaround for platforms where clearDepth doesn't seem to work + // without reseting the depthRange. See https://github.com/mapbox/mapbox-gl-js/issues/3437 + this.depthRange.set([0, 1]); + this.clearDepth.set(depth); this.depthMask.set(true); }