show tile numbers
This commit is contained in:
27
include/llmr/geometry/debug_font_buffer.hpp
Normal file
27
include/llmr/geometry/debug_font_buffer.hpp
Normal 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
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
|
||||
uint32_t length();
|
||||
void bind();
|
||||
|
||||
private:
|
||||
std::vector<uint16_t> array;
|
||||
uint32_t buffer;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user