Lines 33-48
Link Here
|
33 |
#include "FTGLOutlineFont.h" |
33 |
#include "FTGLOutlineFont.h" |
34 |
#include "FTFont.h" |
34 |
#include "FTFont.h" |
35 |
|
35 |
|
36 |
/* Avoid FTGLOutlineFont::Render() as expensive to call repeatedly */ |
|
|
37 |
class MyOutlineFont : public FTGLOutlineFont |
38 |
{ |
39 |
public: |
40 |
MyOutlineFont(const unsigned char *pBufferBytes, size_t bufferSizeInBytes) : |
41 |
FTGLOutlineFont(pBufferBytes, bufferSizeInBytes) {} |
42 |
|
43 |
void render(const char* string) {FTFont::Render(string);} |
44 |
}; |
45 |
|
46 |
#define FONT_SIZE (base_unit / 20.0f) |
36 |
#define FONT_SIZE (base_unit / 20.0f) |
47 |
#define CUBE_FONT_SIZE (base_unit / 24.0f) |
37 |
#define CUBE_FONT_SIZE (base_unit / 24.0f) |
48 |
|
38 |
|
Lines 59-65
public:
Link Here
|
59 |
fonts[0] = new FTGLPolygonFont(fd, fs); |
49 |
fonts[0] = new FTGLPolygonFont(fd, fs); |
60 |
fonts[0]->FaceSize(ptSize); |
50 |
fonts[0]->FaceSize(ptSize); |
61 |
|
51 |
|
62 |
fonts[1] = new MyOutlineFont(fd, fs); |
52 |
fonts[1] = new FTGLOutlineFont(fd, fs); |
63 |
fonts[1]->FaceSize(ptSize); |
53 |
fonts[1]->FaceSize(ptSize); |
64 |
|
54 |
|
65 |
float sx, sy, sz, fx, fy, fz; |
55 |
float sx, sy, sz, fx, fy, fz; |