summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/painter_background.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-26 12:53:32 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-05 10:52:19 -0700
commit7a3bef091e7390fa57bf33f1a704c893768b5625 (patch)
treeaf798d879923fd45e763f5dc5449b7e8419aa192 /src/mbgl/renderer/painter_background.cpp
parentac8a74ebccb85f83c40b9fccfeb11dc2cb3c79e4 (diff)
downloadqtlocation-mapboxgl-7a3bef091e7390fa57bf33f1a704c893768b5625.tar.gz
[core] Refactor Buffer
Diffstat (limited to 'src/mbgl/renderer/painter_background.cpp')
-rw-r--r--src/mbgl/renderer/painter_background.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/renderer/painter_background.cpp b/src/mbgl/renderer/painter_background.cpp
index af92f17c97..2dab1ccacb 100644
--- a/src/mbgl/renderer/painter_background.cpp
+++ b/src/mbgl/renderer/painter_background.cpp
@@ -46,14 +46,14 @@ void Painter::renderBackground(PaintParameters& parameters, const BackgroundLaye
patternShader.u_opacity = properties.backgroundOpacity;
spriteAtlas->bind(true, context, 0);
- arrayBackgroundPattern.bind(patternShader, tileStencilBuffer, BUFFER_OFFSET(0), context);
+ arrayBackgroundPattern.bind(patternShader, tileTriangleVertexes, BUFFER_OFFSET(0), context);
} else {
context.program = plainShader.getID();
plainShader.u_color = properties.backgroundColor;
plainShader.u_opacity = properties.backgroundOpacity;
- arrayBackground.bind(plainShader, tileStencilBuffer, BUFFER_OFFSET(0), context);
+ arrayBackground.bind(plainShader, tileTriangleVertexes, BUFFER_OFFSET(0), context);
}
context.stencilTest = false;
@@ -84,7 +84,7 @@ void Painter::renderBackground(PaintParameters& parameters, const BackgroundLaye
plainShader.u_matrix = vertexMatrix;
}
- MBGL_CHECK_ERROR(glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)tileStencilBuffer.index()));
+ MBGL_CHECK_ERROR(glDrawArrays(GL_TRIANGLE_STRIP, 0, static_cast<GLsizei>(tileTriangleVertexes.vertexCount)));
}
}