include/Spectre/Graphics/Font.h: move texture variable into it's own struct.
When implementing rendering of glyphs with different properties: size, stroke width, bold etc. We will need to store them in different textures.
This commit is contained in:
parent
1e5d448fa1
commit
c74dda1200
2 changed files with 32 additions and 27 deletions
|
|
@ -57,16 +57,20 @@ protected :
|
|||
|
||||
protected :
|
||||
|
||||
struct CacheTexture {
|
||||
vec2u texpos;
|
||||
unsigned shelf;
|
||||
Texture texture;
|
||||
};
|
||||
|
||||
FontDriver *m_driver;
|
||||
|
||||
mutable std::map<unsigned char, Glyph> m_charset;
|
||||
|
||||
unsigned int m_size; // font size, in pixels. not points.
|
||||
|
||||
// Texture atlas used by the font.
|
||||
mutable Texture m_texture;
|
||||
mutable vec2u m_texpos;
|
||||
mutable unsigned m_shelf;
|
||||
// Alpha Cache texture.
|
||||
mutable CacheTexture m_cacheTextureA;
|
||||
|
||||
std::vector<unsigned char> m_rawData;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue