do not explicitly render matte; we already cleared the background with glClear
This commit is contained in:
@@ -62,6 +62,8 @@ public:
|
||||
void cleanup();
|
||||
|
||||
|
||||
// Renders the backdrop of the OpenGL view. This also paints in areas where we don't have any
|
||||
// tiles whatsoever.
|
||||
void clear();
|
||||
|
||||
// Updates the default matrices to the current viewport dimensions.
|
||||
@@ -73,10 +75,6 @@ public:
|
||||
// Renders debug information for a tile.
|
||||
void renderTileDebug(const Tile& tile);
|
||||
|
||||
// Renders the backdrop of the OpenGL view. This also paints in areas where we don't have any
|
||||
// tiles whatsoever.
|
||||
void renderMatte();
|
||||
|
||||
// Renders the red debug frame around a tile, visualizing its perimeter.
|
||||
void renderDebugFrame();
|
||||
|
||||
|
||||
@@ -560,8 +560,6 @@ void Map::render() {
|
||||
source->source->finishRender(painter);
|
||||
}
|
||||
|
||||
painter.renderMatte();
|
||||
|
||||
// Schedule another rerender when we definitely need a next frame.
|
||||
if (transform.needsTransition() || style->hasTransitions()) {
|
||||
update();
|
||||
|
||||
@@ -205,21 +205,3 @@ const mat4 &Painter::translatedMatrix(const std::array<float, 2> &translation, c
|
||||
return vtxMatrix;
|
||||
}
|
||||
}
|
||||
|
||||
void Painter::renderMatte() {
|
||||
gl::group group("matte");
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glStencilFunc(GL_EQUAL, 0x0, 0xFF);
|
||||
|
||||
Color matte = {{ 0, 0, 0, 1 }};
|
||||
|
||||
useProgram(plainShader->program);
|
||||
plainShader->setMatrix(nativeMatrix);
|
||||
|
||||
// Draw the clipping mask
|
||||
matteArray.bind(*plainShader, tileStencilBuffer, BUFFER_OFFSET(0));
|
||||
plainShader->setColor(matte);
|
||||
glDrawArrays(GL_TRIANGLES, 0, (GLsizei)tileStencilBuffer.index());
|
||||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user