CachedFont destructor.
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 6m59s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 6m59s
This commit is contained in:
@@ -35,7 +35,7 @@ namespace JGL {
|
||||
|
||||
/// @param window_size
|
||||
void Update(const Vector2& window_size);
|
||||
inline void PurgeFontCache() { fontCache.purgeCache(); }
|
||||
inline void PurgeFontCache() { JGL::fontCache.purgeCache(); }
|
||||
std::array<GLfloat, 16> OpenGLPerspectiveProjectionRH(float fovY, float aspect, float z_near, float z_far);
|
||||
/// Returns true if the graphics driver meets the requirements (GL Version & Extensions).
|
||||
bool MeetsRequirements();
|
||||
|
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
//CachedGlyph(GLuint texture_id, char c);
|
||||
CachedGlyph(char c, std::array<GLfloat, 12> texcoords, float x2o, float y2o, float w, float h, float advX, float advY);
|
||||
char getCharacter();
|
||||
char getCharacter() const;
|
||||
[[nodiscard]] std::array<GLfloat, 12> getTexCoords() const;
|
||||
};
|
||||
|
||||
@@ -38,16 +38,19 @@ private:
|
||||
GLsizei texture_width = 0, texture_height = 0;
|
||||
unsigned int font_size = 0;
|
||||
unsigned int font_index = 0;
|
||||
void Erase();
|
||||
public:
|
||||
void appendGlyph(CachedGlyph* glyph);
|
||||
unsigned int getFontSize();
|
||||
unsigned int getFontIndex();
|
||||
unsigned int getFontSize() const;
|
||||
unsigned int getFontIndex() const;
|
||||
CachedGlyph* getGlyph(char c);
|
||||
std::unordered_map<char, CachedGlyph*> getGlyphs();
|
||||
const GLuint* getTexture();
|
||||
const GLuint* getTextureHandle();
|
||||
[[nodiscard]] GLsizei getTextureWidth() const;
|
||||
[[nodiscard]] GLsizei getTextureHeight() const;
|
||||
public:
|
||||
CachedFont(GLuint texture_id, GLsizei texture_width, GLsizei texture_height, unsigned int font_size, unsigned int font_index);
|
||||
~CachedFont();
|
||||
};
|
||||
|
||||
class JGL::FontCache {
|
||||
|
Reference in New Issue
Block a user