-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGobanOverlay.h
49 lines (42 loc) · 1.02 KB
/
GobanOverlay.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// Created by jan on 21.6.17.
//
#ifndef GOBAN_GOBANOVERLAY_H
#define GOBAN_GOBANOVERLAY_H
#include <ft2build.h>
//#include "glyphy-freetype.h"
#include "glyphy/GlyphyFont.h"
#include "Metrics.h"
#include "GobanModel.h"
#include "Camera.h"
#include <spdlog/spdlog.h>
#include <GlyphyState.h>
class GobanView;
struct Layer {
float height;
glm::vec4 color;
bool empty;
};
class GobanOverlay {
public:
GobanOverlay(const GobanView& view): view(view), overlayReady(false) {
init();
}
bool init();
void use();
void unuse();
void draw(const GobanModel&, const DDG::Camera&, int updateFlag, float time, unsigned);
~GobanOverlay();
void setReady() { overlayReady = true; }
void Update(const Board& board, const GobanModel& model);
private:
FT_Library ft_library;
FT_Face ft_face;
std::shared_ptr<GlyphyFont> font;
const GobanView& view;
bool overlayReady;
double font_size;
static std::array<Layer, 3> layers;
std::shared_ptr<GlyphyState> st;
};
#endif //GOBAN_GOBANOVERLAY_H