forked from vojtechsimetka/QT-simple-vector-drawing-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
font.h
45 lines (37 loc) · 672 Bytes
/
font.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
/**
* PGR 2013 project
* Texture-mapped text.
* Inspired by http://10098.arnet.am/?p=118
*
* @author xskota05 Klara Vankova
* xsimet00 Vojtech Simetka
* Grigory
*
* @date 2011/25/4
* @version 1
* @file font.h
*/
#ifndef FONT_H
#define FONT_H
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <QGLWidget>
#if defined(__APPLE__)
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
class Font
{
public:
Font();
void render(const char* c, float x, float y);
private:
GLuint fontTexture;
GLuint dl;
void loadTexture();
QImage glTextureImg;
};
#endif // FONT_H