added text widget parsing and rendering
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
enum class kFont : uint16_t
|
||||
{
|
||||
Arial_11 = const_hash("arial-16"),
|
||||
Arial_11 = const_hash("arial-11"),
|
||||
};
|
||||
|
||||
class Font
|
||||
@@ -23,8 +23,10 @@ public:
|
||||
|
||||
class FontManager
|
||||
{
|
||||
static std::map<kFont, Font> m_fonts;
|
||||
public:
|
||||
static std::map<kFont, Font> m_fonts;
|
||||
static Sampler m_sampler;
|
||||
static void init();
|
||||
static bool load(kFont id, const char* ttf);
|
||||
static const Font& get(kFont id);
|
||||
};
|
||||
@@ -35,6 +37,9 @@ public:
|
||||
GLuint font_array = 0;
|
||||
int font_array_count = 0;
|
||||
GLuint font_buffers[2] = {0, 0};
|
||||
kFont font_id;
|
||||
glm::vec2 bb;
|
||||
bool create();
|
||||
void update(kFont id, const char* text);
|
||||
void draw();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user