make sure we retain shared state when destructing the map object

refs #261
This commit is contained in:
Konstantin Käfer
2014-05-30 17:00:47 +02:00
parent 3e7f801de1
commit 78fda8bb62
18 changed files with 174 additions and 110 deletions

View File

@@ -15,11 +15,13 @@ void Painter::drawClippingMasks(const Sources &sources) {
glDepthRange(1.0f, 1.0f);
glStencilMask(0xFF);
Color background = map.getStyle().computed.background.color;
background[0] *= map.getStyle().computed.background.opacity;
background[1] *= map.getStyle().computed.background.opacity;
background[2] *= map.getStyle().computed.background.opacity;
background[3] *= map.getStyle().computed.background.opacity;
const BackgroundProperties &properties = map.getStyle()->computed.background;
Color background = properties.color;
const float opacity = properties.opacity;
background[0] *= opacity;
background[1] *= opacity;
background[2] *= opacity;
background[3] *= opacity;
plainShader->setColor(background);
coveringPlainArray.bind(*plainShader, tileStencilBuffer, BUFFER_OFFSET(0));