show tile numbers

This commit is contained in:
Konstantin Käfer
2014-01-16 16:28:07 +01:00
parent ba61ab44af
commit 96dacecd6e
8 changed files with 341 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#ifndef LLMR_GEOMETRY_DEBUG_FONT_BUFFER
#define LLMR_GEOMETRY_DEBUG_FONT_BUFFER
#include <vector>
namespace llmr {
class debug_font_buffer {
public:
debug_font_buffer();
~debug_font_buffer();
void addText(const char *text, double left, double baseline, double scale = 1);
void clear();
uint32_t length();
void bind();
private:
std::vector<uint16_t> array;
uint32_t buffer;
bool dirty;
};
}
#endif

View File

@@ -15,6 +15,7 @@ public:
uint32_t length();
void bind();
private:
std::vector<uint16_t> array;
uint32_t buffer;

View File

@@ -1,6 +1,7 @@
#ifndef LLMR_MAP_TILE
#define LLMR_MAP_TILE
#include "../geometry/debug_font_buffer.hpp"
#include "../geometry/linevertexbuffer.hpp"
#include <stdint.h>
@@ -46,6 +47,7 @@ public:
const tile_id id;
state state;
linevertexbuffer lineVertex;
debug_font_buffer debugFontVertex;
private:
// Source data