Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/sfont/glfont.h @ 3471

Last change on this file since 3471 was 3458, checked in by bensch, 20 years ago

orxonox/trunk: some minor changes in the framework, and the font is 25% on the go.

File size: 768 bytes
Line 
1/*!
2    \file glfont.h
3    \brief Handles the display of glFonts.
4*/
5
6#ifndef _GLFONT_H
7#define _GLFONT_H
8
9#include "../glincl.h"
10
11class GLFont
12{
13 public:
14  GLFont();
15  GLFont(const char* fontFile);
16  ~GLFont();
17 
18
19
20  bool setFont(const char* fontFile);
21  void setText(const char* text);
22
23  void setStyle(char* style);
24  void setSize(void);
25  void setPosition(int x, int y);
26 
27  void renderText(void);
28  void renderText(const char* text, int x, int y);
29
30 private:
31  char* fontFile;
32  char* text;
33  GLuint texture;
34  int positionX;
35  int positionY;
36  int renderStyle;
37  SDL_Surface* surface;
38  GLfloat* texcoord;
39
40  bool init(const char* fontFile);
41  bool loadTexture();
42  static int powerOfTwo(int input);
43
44  static bool ttfInitialized;
45
46};
47
48#endif /* _GLFONT_H */
Note: See TracBrowser for help on using the repository browser.