remove support for composite layers

This commit is contained in:
Ansis Brammanis
2014-08-13 16:16:08 -07:00
committed by Konstantin Käfer
parent 478a1dae67
commit 32a1711d8c
17 changed files with 53 additions and 373 deletions

View File

@@ -539,10 +539,6 @@ void Map::prepare() {
bool dimensionsChanged = oldState.getFramebufferWidth() != state.getFramebufferWidth() ||
oldState.getFramebufferHeight() != state.getFramebufferHeight();
if (pixelRatioChanged || dimensionsChanged) {
painter.clearFramebuffers();
}
animationTime = util::now();
updateSources();
style->updateProperties(state.getNormalizedZoom(), animationTime);
@@ -564,8 +560,6 @@ void Map::render() {
painter.clear();
painter.resetFramebuffer();
painter.resize();
painter.changeMatrix();
@@ -639,33 +633,7 @@ void Map::renderLayers(std::shared_ptr<StyleLayerGroup> group) {
}
void Map::renderLayer(std::shared_ptr<StyleLayer> layer_desc, RenderPass pass, const Tile::ID* id, const mat4* matrix) {
if (layer_desc->layers && layer_desc->type != StyleLayerType::Raster) {
// This is a layer group. We render them during our translucent render pass.
if (pass == RenderPass::Translucent) {
const CompositeProperties &properties = layer_desc->getProperties<CompositeProperties>();
if (properties.isVisible()) {
gl::group group(std::string("group: ") + layer_desc->id);
if (debug::renderTree) {
std::cout << std::string(indent++ * 4, ' ') << "+ " << layer_desc->id
<< " (Composite) {" << std::endl;
}
painter.pushFramebuffer();
renderLayers(layer_desc->layers);
GLuint texture = painter.popFramebuffer();
// Render the previous texture onto the screen.
painter.drawComposite(texture, properties);
if (debug::renderTree) {
std::cout << std::string(--indent * 4, ' ') << "}" << std::endl;
}
}
}
} else if (layer_desc->type == StyleLayerType::Background) {
if (layer_desc->type == StyleLayerType::Background) {
// This layer defines the background color.
} else {
// This is a singular layer.