/*
* Font.h
* Jonathan Boldiga
* 09/11/03
*
* Description: support for bitmap fonts
*
*/
#ifndef __FONT_H
#define __FONT_H
#include
#include
#include
class Font{
private:
unsigned int texID; // font texture id
unsigned int callList; // font display list
float r, g, b, a; // RGBA
int screenX, screenY; // screen coordinates
float xpos, ypos, zpos; // 3d coordinates
void LoadTexture(); // loads the TGA font texture
void CreateCallLists(); // creates the font display list
public:
Font();
Font(char* name, int size);
~Font();
void build(char* name, int size);
void clearFont();
void print(const char* str, ...);
void setPos2D(int x, int y){
screenX = x; screenY = y;
}
void setPos3D(float x, float y, float z){
xpos = x; ypos = y; zpos = z;
}
void setRGB(float red, float green, float blue){
r = red; g = green; b = blue; a = 1.0;
}
void setRGBA(float red, float green, float blue, float alpha){
r = red; g = green; b = blue; a = alpha;
}
};
#endif