feat: add DevPanel

This commit is contained in:
2026-04-25 14:24:50 +08:00
parent ada0603a2f
commit 4ca2133ff3
13 changed files with 404 additions and 39 deletions

View File

@@ -5,6 +5,7 @@
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <filesystem>
#include <string>
#include <unordered_map>
@@ -31,6 +32,7 @@ public:
static std::vector<Vertex2D> vertices(const std::string& text, float x = 0.0f, float y = 0.0f, float scale = 1.0f);
static GLuint text_texture();
static const std::filesystem::path& font_path();
private:
FT_Library m_ft;
FT_Face m_face;
@@ -39,6 +41,7 @@ private:
float m_texture_height = 64;
static inline GLuint m_text_texture;
static inline std::filesystem::path m_font_path{ASSETS_PATH "fonts/IBMPlexSans-Regular.ttf"};
std::unordered_map<char8_t, Character> m_characters;
void load_character(char8_t c);