This changes the clip IDs from sequential to a huffman prefix tree, meaning that parent tiles share the same prefix with child tiles (but are shorter). This allows us to use the same checkerboard pattern to draw all tiles. TODO: - make sure we're not overflowing the 8 bit limit of the stencil buffer - draw all checkerboard fields at the same time, with one draw call - fix raster drawing (fading, clipping) refs #132
28 lines
492 B
C++
28 lines
492 B
C++
#ifndef LLMR_MAP_RASTER_TILE_DATA
|
|
#define LLMR_MAP_RASTER_TILE_DATA
|
|
|
|
#include <llmr/map/tile_data.hpp>
|
|
|
|
#include <llmr/renderer/raster_bucket.hpp>
|
|
|
|
|
|
namespace llmr {
|
|
|
|
class RasterTileData : public TileData {
|
|
friend class TileParser;
|
|
|
|
public:
|
|
RasterTileData(Tile::ID id, Map &map, const std::string url);
|
|
~RasterTileData();
|
|
|
|
virtual void parse();
|
|
virtual void render(Painter &painter, const LayerDescription& layer_desc);
|
|
|
|
protected:
|
|
RasterBucket bucket;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|