Files
MapLibreParticleLab/include/llmr/renderer/debug_bucket.hpp
Konstantin Käfer 0bfd7b0f43 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
2014-05-09 18:10:28 +02:00

37 lines
740 B
C++

#ifndef LLMR_RENDERER_DEBUGBUCKET
#define LLMR_RENDERER_DEBUGBUCKET
#include <llmr/renderer/bucket.hpp>
#include <llmr/style/bucket_description.hpp>
#include <llmr/geometry/debug_font_buffer.hpp>
#include <llmr/geometry/vao.hpp>
#include <vector>
#include <memory>
#ifndef BUFFER_OFFSET
#define BUFFER_OFFSET(i) ((char *)nullptr + (i))
#endif
namespace llmr {
class PlainShader;
class DebugBucket : public Bucket {
public:
DebugBucket(DebugFontBuffer& fontBuffer);
virtual void render(Painter& painter, const std::string& layer_name, const Tile::ID& id);
void drawLines(PlainShader& shader);
void drawPoints(PlainShader& shader);
private:
DebugFontBuffer& fontBuffer;
VertexArrayObject array;
};
}
#endif