refactor font code into classes
This commit is contained in:
13
engine/app.h
13
engine/app.h
@@ -4,23 +4,16 @@
|
||||
#include "shape.h"
|
||||
#include "texture.h"
|
||||
#include "layout.h"
|
||||
#include "font.h"
|
||||
|
||||
class App
|
||||
{
|
||||
Sampler sampler;
|
||||
Texture2D tex;
|
||||
LayoutManager layout;
|
||||
stbtt_fontinfo font;
|
||||
Texture2D font_tex;
|
||||
std::vector<stbtt_bakedchar> chars;
|
||||
Plane plane;
|
||||
GLuint font_array;
|
||||
int font_array_count = 0;
|
||||
GLuint font_buffers[2];
|
||||
const int w = 512;
|
||||
const int h = 512;
|
||||
const int num_chars = 96;
|
||||
const int start_char = 32;
|
||||
Font font;
|
||||
TextMesh text;
|
||||
public:
|
||||
static App I;
|
||||
float width;
|
||||
|
||||
Reference in New Issue
Block a user