summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/painter_symbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/renderer/painter_symbol.cpp')
-rw-r--r--src/mbgl/renderer/painter_symbol.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mbgl/renderer/painter_symbol.cpp b/src/mbgl/renderer/painter_symbol.cpp
index 2a8e0fdcc3..496b9ee9cc 100644
--- a/src/mbgl/renderer/painter_symbol.cpp
+++ b/src/mbgl/renderer/painter_symbol.cpp
@@ -144,6 +144,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
config.depthMask = GL_FALSE;
if (bucket.hasCollisionBoxData()) {
+ config.stencilOp.reset();
config.stencilTest = GL_TRUE;
config.program = collisionBoxShader->program;
@@ -170,11 +171,17 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
if (drawAcrossEdges) {
config.stencilTest = GL_FALSE;
} else {
+ config.stencilOp.reset();
config.stencilTest = GL_TRUE;
}
if (bucket.hasIconData()) {
- config.depthTest = layout.icon.rotation_alignment == RotationAlignmentType::Map;
+ if (layout.icon.rotation_alignment == RotationAlignmentType::Map) {
+ config.depthFunc.reset();
+ config.depthTest = GL_TRUE;
+ } else {
+ config.depthTest = GL_FALSE;
+ }
bool sdf = bucket.sdfIcons;
@@ -246,7 +253,12 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
}
if (bucket.hasTextData()) {
- config.depthTest = layout.text.rotation_alignment == RotationAlignmentType::Map;
+ if (layout.text.rotation_alignment == RotationAlignmentType::Map) {
+ config.depthFunc.reset();
+ config.depthTest = GL_TRUE;
+ } else {
+ config.depthTest = GL_FALSE;
+ }
glyphAtlas->bind();