summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/painter_fill.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-11-04 13:37:00 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-11-04 13:38:51 +0100
commit8e63084c9e77486c9843ce469e0e8b663bfebb03 (patch)
tree4a3a224bda2450d15caa2915158b5bb677407d1c /src/mbgl/renderer/painter_fill.cpp
parent1468ff13e338bec04b466cb95a28816a3852e487 (diff)
downloadqtlocation-mapboxgl-8e63084c9e77486c9843ce469e0e8b663bfebb03.tar.gz
[core] Move remaining GL state from Painter into GLConfig object
Diffstat (limited to 'src/mbgl/renderer/painter_fill.cpp')
-rw-r--r--src/mbgl/renderer/painter_fill.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/renderer/painter_fill.cpp b/src/mbgl/renderer/painter_fill.cpp
index b4247d6d91..4fbf072367 100644
--- a/src/mbgl/renderer/painter_fill.cpp
+++ b/src/mbgl/renderer/painter_fill.cpp
@@ -42,9 +42,9 @@ void Painter::renderFill(FillBucket& bucket, const FillLayer& layer, const TileI
// 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) {
- useProgram(outlineShader->program);
+ config.program = outlineShader->program;
outlineShader->u_matrix = vtxMatrix;
- lineWidth(2.0f); // This is always fixed and does not depend on the pixelRatio!
+ config.lineWidth = 2.0f; // This is always fixed and does not depend on the pixelRatio!
outlineShader->u_color = stroke_color;
@@ -76,7 +76,7 @@ void Painter::renderFill(FillBucket& bucket, const FillLayer& layer, const TileI
1.0f / (posB.size[0] * factor * properties.image.toScale),
1.0f / (posB.size[1] * factor * properties.image.toScale));
- useProgram(patternShader->program);
+ config.program = patternShader->program;
patternShader->u_matrix = vtxMatrix;
patternShader->u_pattern_tl_a = posA.tl;
patternShader->u_pattern_br_a = posA.br;
@@ -104,7 +104,7 @@ void Painter::renderFill(FillBucket& bucket, const FillLayer& layer, const TileI
// fragments or when it's translucent and we're drawing translucent
// fragments
// Draw filling rectangle.
- useProgram(plainShader->program);
+ config.program = plainShader->program;
plainShader->u_matrix = vtxMatrix;
plainShader->u_color = fill_color;
@@ -118,9 +118,9 @@ void Painter::renderFill(FillBucket& bucket, const FillLayer& layer, const TileI
// 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) {
- useProgram(outlineShader->program);
+ config.program = outlineShader->program;
outlineShader->u_matrix = vtxMatrix;
- lineWidth(2.0f); // This is always fixed and does not depend on the pixelRatio!
+ config.lineWidth = 2.0f; // This is always fixed and does not depend on the pixelRatio!
outlineShader->u_color = fill_color;