feat: add shader class

This commit is contained in:
2026-03-29 11:13:34 +08:00
parent b1a5581131
commit 2cfbd1a03b
11 changed files with 216 additions and 90 deletions

View File

@@ -16,12 +16,14 @@ struct Character {
GLuint advance;
};
class Shader;
class Font {
public:
Font();
~Font();
static void render_text(GLuint program, const std::string& text, float x, float y, float scale, const glm::vec3& color);
static void render_text(const Shader& shader, const std::string& text, float x, float y, float scale, const glm::vec3& color);
private:
FT_Library m_ft;