summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-20 13:18:16 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-20 13:24:20 +0300
commit97dffeb03dba6ae949ca9ce2e054ceab3acb99b7 (patch)
tree19c03819a2f26a224db79885c71a18a0625fbc5c /src
parentdf5a39570819abc6e083bee8bc1fc9da8d92b68c (diff)
downloadqtlocation-mapboxgl-97dffeb03dba6ae949ca9ce2e054ceab3acb99b7.tar.gz
[core] s/Wireframe/Overdraw/g
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp6
-rw-r--r--src/mbgl/renderer/painter.cpp4
-rw-r--r--src/mbgl/renderer/painter.hpp2
-rw-r--r--src/mbgl/renderer/painter_background.cpp4
-rw-r--r--src/mbgl/renderer/painter_circle.cpp2
-rw-r--r--src/mbgl/renderer/painter_fill.cpp10
-rw-r--r--src/mbgl/renderer/painter_line.cpp6
-rw-r--r--src/mbgl/renderer/painter_raster.cpp2
-rw-r--r--src/mbgl/renderer/painter_symbol.cpp4
-rw-r--r--src/mbgl/style/style.cpp4
10 files changed, 22 insertions, 22 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index f4cca3b2b5..fa7bebf9a6 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -787,14 +787,14 @@ void Map::cycleDebugOptions() {
#ifndef GL_ES_VERSION_2_0
if (impl->debugOptions & MapDebugOptions::StencilClip)
impl->debugOptions = MapDebugOptions::NoDebug;
- else if (impl->debugOptions & MapDebugOptions::Wireframe)
+ else if (impl->debugOptions & MapDebugOptions::Overdraw)
impl->debugOptions = MapDebugOptions::StencilClip;
#else
- if (impl->debugOptions & MapDebugOptions::Wireframe)
+ if (impl->debugOptions & MapDebugOptions::Overdraw)
impl->debugOptions = MapDebugOptions::NoDebug;
#endif // GL_ES_VERSION_2_0
else if (impl->debugOptions & MapDebugOptions::Collision)
- impl->debugOptions = MapDebugOptions::Wireframe;
+ impl->debugOptions = MapDebugOptions::Overdraw;
else if (impl->debugOptions & MapDebugOptions::Timestamps)
impl->debugOptions = impl->debugOptions | MapDebugOptions::Collision;
else if (impl->debugOptions & MapDebugOptions::ParseStatus)
diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp
index fae5c74d7b..56276c26c5 100644
--- a/src/mbgl/renderer/painter.cpp
+++ b/src/mbgl/renderer/painter.cpp
@@ -145,7 +145,7 @@ void Painter::render(const Style& style, const FrameData& frame_, SpriteAtlas& a
config.depthMask = GL_TRUE;
config.colorMask = { GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE };
- if (isWireframe()) {
+ if (isOverdraw()) {
config.blend = GL_TRUE;
config.blendFunc = { GL_CONSTANT_COLOR, GL_ONE };
const float overdraw = 1.0f / 8.0f;
@@ -248,7 +248,7 @@ void Painter::renderPass(RenderPass pass_,
if (!layer.baseImpl->hasRenderPass(pass))
continue;
- if (isWireframe()) {
+ if (isOverdraw()) {
config.blend = GL_TRUE;
} else if (pass == RenderPass::Translucent) {
config.blendFunc.reset();
diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp
index d2d722ef7f..1f511467d0 100644
--- a/src/mbgl/renderer/painter.hpp
+++ b/src/mbgl/renderer/painter.hpp
@@ -156,7 +156,7 @@ private:
void setDepthSublayer(int n);
- bool isWireframe() const { return frame.debugOptions & MapDebugOptions::Wireframe; }
+ bool isOverdraw() const { return frame.debugOptions & MapDebugOptions::Overdraw; }
mat4 projMatrix;
mat4 nativeMatrix;
diff --git a/src/mbgl/renderer/painter_background.cpp b/src/mbgl/renderer/painter_background.cpp
index f9a67ee59c..7ced6a5c4f 100644
--- a/src/mbgl/renderer/painter_background.cpp
+++ b/src/mbgl/renderer/painter_background.cpp
@@ -28,7 +28,7 @@ void Painter::renderBackground(const BackgroundLayer& layer) {
if (!imagePosA || !imagePosB)
return;
- config.program = isWireframe() ? patternShader->getOverdrawID() : patternShader->getID();
+ config.program = isOverdraw() ? patternShader->getOverdrawID() : patternShader->getID();
patternShader->u_matrix = identityMatrix;
patternShader->u_pattern_tl_a = imagePosA->tl;
patternShader->u_pattern_br_a = imagePosA->br;
@@ -44,7 +44,7 @@ void Painter::renderBackground(const BackgroundLayer& layer) {
plainShader->u_color = properties.backgroundColor;
plainShader->u_opacity = properties.backgroundOpacity;
- config.program = isWireframe() ? plainShader->getOverdrawID() : plainShader->getID();
+ config.program = isOverdraw() ? plainShader->getOverdrawID() : plainShader->getID();
backgroundArray.bind(*plainShader, tileStencilBuffer, BUFFER_OFFSET(0), store);
}
diff --git a/src/mbgl/renderer/painter_circle.cpp b/src/mbgl/renderer/painter_circle.cpp
index d92ca1ae9b..e72f8a994f 100644
--- a/src/mbgl/renderer/painter_circle.cpp
+++ b/src/mbgl/renderer/painter_circle.cpp
@@ -27,7 +27,7 @@ void Painter::renderCircle(CircleBucket& bucket,
mat4 vtxMatrix = translatedMatrix(matrix, properties.circleTranslate, tileID,
properties.circleTranslateAnchor);
- config.program = isWireframe() ? circleShader->getOverdrawID() : circleShader->getID();
+ config.program = isOverdraw() ? circleShader->getOverdrawID() : circleShader->getID();
circleShader->u_matrix = vtxMatrix;
circleShader->u_extrude_scale = extrudeScale;
diff --git a/src/mbgl/renderer/painter_fill.cpp b/src/mbgl/renderer/painter_fill.cpp
index 62e808614e..44cdbe7411 100644
--- a/src/mbgl/renderer/painter_fill.cpp
+++ b/src/mbgl/renderer/painter_fill.cpp
@@ -46,7 +46,7 @@ void Painter::renderFill(FillBucket& bucket,
// Because we're drawing top-to-bottom, and we update the stencil mask
// befrom, we have to draw the outline first (!)
if (outline && pass == RenderPass::Translucent) {
- config.program = isWireframe() ? outlineShader->getOverdrawID() : outlineShader->getID();
+ config.program = isOverdraw() ? outlineShader->getOverdrawID() : outlineShader->getID();
outlineShader->u_matrix = vertexMatrix;
outlineShader->u_outline_color = strokeColor;
@@ -76,7 +76,7 @@ void Painter::renderFill(FillBucket& bucket,
// Image fill.
if (pass == RenderPass::Translucent && imagePosA && imagePosB) {
- config.program = isWireframe() ? patternShader->getOverdrawID() : patternShader->getID();
+ config.program = isOverdraw() ? patternShader->getOverdrawID() : patternShader->getID();
patternShader->u_matrix = vertexMatrix;
patternShader->u_pattern_tl_a = imagePosA->tl;
patternShader->u_pattern_br_a = imagePosA->br;
@@ -105,7 +105,7 @@ void Painter::renderFill(FillBucket& bucket,
bucket.drawElements(*patternShader, store);
if (properties.fillAntialias && !isOutlineColorDefined) {
- config.program = isWireframe() ? outlinePatternShader->getOverdrawID() : outlinePatternShader->getID();
+ config.program = isOverdraw() ? outlinePatternShader->getOverdrawID() : outlinePatternShader->getID();
outlinePatternShader->u_matrix = vertexMatrix;
// Draw the entire line
@@ -140,7 +140,7 @@ void Painter::renderFill(FillBucket& bucket,
// fragments or when it's translucent and we're drawing translucent
// fragments
// Draw filling rectangle.
- config.program = isWireframe() ? plainShader->getOverdrawID() : plainShader->getID();
+ config.program = isOverdraw() ? plainShader->getOverdrawID() : plainShader->getID();
plainShader->u_matrix = vertexMatrix;
plainShader->u_color = fillColor;
plainShader->u_opacity = opacity;
@@ -154,7 +154,7 @@ void Painter::renderFill(FillBucket& bucket,
// Because we're drawing top-to-bottom, and we update the stencil mask
// below, we have to draw the outline first (!)
if (fringeline && pass == RenderPass::Translucent) {
- config.program = isWireframe() ? outlineShader->getOverdrawID() : outlineShader->getID();
+ config.program = isOverdraw() ? outlineShader->getOverdrawID() : outlineShader->getID();
outlineShader->u_matrix = vertexMatrix;
outlineShader->u_outline_color = fillColor;
diff --git a/src/mbgl/renderer/painter_line.cpp b/src/mbgl/renderer/painter_line.cpp
index 447e3f7400..206255095d 100644
--- a/src/mbgl/renderer/painter_line.cpp
+++ b/src/mbgl/renderer/painter_line.cpp
@@ -57,7 +57,7 @@ void Painter::renderLine(LineBucket& bucket,
if (!properties.lineDasharray.value.from.empty()) {
- config.program = isWireframe() ? linesdfShader->getOverdrawID() : linesdfShader->getID();
+ config.program = isOverdraw() ? linesdfShader->getOverdrawID() : linesdfShader->getID();
linesdfShader->u_matrix = vtxMatrix;
linesdfShader->u_linewidth = properties.lineWidth / 2;
@@ -102,7 +102,7 @@ void Painter::renderLine(LineBucket& bucket,
if (!imagePosA || !imagePosB)
return;
- config.program = isWireframe() ? linepatternShader->getOverdrawID() : linepatternShader->getID();
+ config.program = isOverdraw() ? linepatternShader->getOverdrawID() : linepatternShader->getID();
linepatternShader->u_matrix = vtxMatrix;
linepatternShader->u_linewidth = properties.lineWidth / 2;
@@ -138,7 +138,7 @@ void Painter::renderLine(LineBucket& bucket,
bucket.drawLinePatterns(*linepatternShader, store);
} else {
- config.program = isWireframe() ? lineShader->getOverdrawID() : lineShader->getID();
+ config.program = isOverdraw() ? lineShader->getOverdrawID() : lineShader->getID();
lineShader->u_matrix = vtxMatrix;
lineShader->u_linewidth = properties.lineWidth / 2;
diff --git a/src/mbgl/renderer/painter_raster.cpp b/src/mbgl/renderer/painter_raster.cpp
index 6394d61dcc..783879892e 100644
--- a/src/mbgl/renderer/painter_raster.cpp
+++ b/src/mbgl/renderer/painter_raster.cpp
@@ -18,7 +18,7 @@ void Painter::renderRaster(RasterBucket& bucket,
const RasterPaintProperties& properties = layer.impl->paint;
if (bucket.hasData()) {
- config.program = isWireframe() ? rasterShader->getOverdrawID() : rasterShader->getID();
+ config.program = isOverdraw() ? rasterShader->getOverdrawID() : rasterShader->getID();
rasterShader->u_matrix = matrix;
rasterShader->u_buffer = 0;
rasterShader->u_opacity = properties.rasterOpacity;
diff --git a/src/mbgl/renderer/painter_symbol.cpp b/src/mbgl/renderer/painter_symbol.cpp
index 374500986b..7eb4e6fce9 100644
--- a/src/mbgl/renderer/painter_symbol.cpp
+++ b/src/mbgl/renderer/painter_symbol.cpp
@@ -58,7 +58,7 @@ void Painter::renderSDF(SymbolBucket &bucket,
exScale = {{ exScale[0] * scale, exScale[1] * scale }};
}
- config.program = isWireframe() ? sdfShader.getOverdrawID() : sdfShader.getID();
+ config.program = isOverdraw() ? sdfShader.getOverdrawID() : sdfShader.getID();
sdfShader.u_matrix = vtxMatrix;
sdfShader.u_extrude_scale = exScale;
sdfShader.u_texsize = texsize;
@@ -199,7 +199,7 @@ void Painter::renderSymbol(SymbolBucket& bucket,
exScale = {{ exScale[0] * scale, exScale[1] * scale }};
}
- config.program = isWireframe() ? iconShader->getOverdrawID() : iconShader->getID();
+ config.program = isOverdraw() ? iconShader->getOverdrawID() : iconShader->getID();
iconShader->u_matrix = vtxMatrix;
iconShader->u_extrude_scale = exScale;
iconShader->u_texsize = {{ float(activeSpriteAtlas->getWidth()) / 4.0f, float(activeSpriteAtlas->getHeight()) / 4.0f }};
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index c3bc5d73a0..cb48790c9f 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -272,8 +272,8 @@ RenderData Style::getRenderData(MapDebugOptions debugOptions) const {
continue;
if (const BackgroundLayer* background = layer->as<BackgroundLayer>()) {
- if (debugOptions & MapDebugOptions::Wireframe) {
- // We want to skip glClear optimization in wireframe mode.
+ if (debugOptions & MapDebugOptions::Overdraw) {
+ // We want to skip glClear optimization in overdraw mode.
result.order.emplace_back(*layer);
continue;
}