Font: move Glyph to it's own header.
This commit is contained in:
parent
5c4eea4ae1
commit
2dd1187ff2
7 changed files with 31 additions and 19 deletions
|
|
@ -6,9 +6,9 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <Spectre/Math/Vector4.h>
|
||||
#include <Spectre/Math/Vector2.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Spectre/Graphics/Font/Glyph.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
|
|
@ -24,16 +24,6 @@ public :
|
|||
std::string name;
|
||||
};
|
||||
|
||||
struct Glyph {
|
||||
vec2b size; // Width, Height of bounding box.
|
||||
vec2b offset; // Offset from cursor where the box begins.
|
||||
unsigned char advance;
|
||||
|
||||
//vec4u tex_coords;
|
||||
vec2u texture_origin;
|
||||
const Texture* texture; // Texture atlas.
|
||||
};
|
||||
|
||||
Font();
|
||||
~Font();
|
||||
|
||||
|
|
|
|||
21
include/Spectre/Graphics/Font/Glyph.h
Normal file
21
include/Spectre/Graphics/Font/Glyph.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
#ifndef SPECTRE_GRAPHICS_FONT_GLYPH_H
|
||||
#define SPECTRE_GRAPHICS_FONT_GLYPH_H
|
||||
|
||||
#include <Spectre/Math/Vector2.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
struct Glyph {
|
||||
vec2b size; // Width, Height of bounding box.
|
||||
vec2b offset; // Offset from cursor where the box begins.
|
||||
unsigned char advance;
|
||||
|
||||
vec2u texture_origin;
|
||||
const Texture* texture; // Texture atlas.
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif // SPECTRE_GRAPHICS_FONT_GLYPH_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue