diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-05-09 18:10:28 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-05-09 18:10:28 +0200 |
commit | 0bfd7b0f430d51dd5661d69876ac5294616d128f (patch) | |
tree | 0a1b706049246a4152dec605b8193b223b81d170 /include/llmr/map/raster_tile_data.hpp | |
parent | 70a7ba81f33d88991d21534b68600d470ad2b798 (diff) | |
download | qtlocation-mapboxgl-0bfd7b0f430d51dd5661d69876ac5294616d128f.tar.gz |
Calculate clip IDs with a huffman prefix tree
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
Diffstat (limited to 'include/llmr/map/raster_tile_data.hpp')
-rw-r--r-- | include/llmr/map/raster_tile_data.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/llmr/map/raster_tile_data.hpp b/include/llmr/map/raster_tile_data.hpp new file mode 100644 index 0000000000..33243334bc --- /dev/null +++ b/include/llmr/map/raster_tile_data.hpp @@ -0,0 +1,27 @@ +#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 |