2
Copyright (c) 1999 Nate Miller
4
Notice: Usage of any code in this file is subject to the rules
5
described in the LICENSE.TXT file included in this directory.
6
Reading, compiling, or otherwise using this code constitutes
7
automatic acceptance of the rules in said text file.
11
Author -- Nate 'm|d' Miller
12
Contact -- vandals1@home.com
13
Web -- http://members.home.com/vandals1
15
#ifndef __GLTEXFONTH__
16
#define __GLTEXFONTH__
19
#define FONT_FILE_NOT_FOUND -13 /* file was not found */
20
#define FONT_BAD_IMAGE_TYPE -14 /* color mapped image or image is not uncompressed */
21
#define FONT_BAD_DIMENSION -15 /* dimension is not a power of 2 */
22
#define FONT_BAD_BITS -16 /* image bits is not 8, 24 or 32 */
23
#define FONT_BAD_DATA -17 /* image data could not be loaded */
24
#define GL_TEX_FONT_VERSION 6
27
typedef float vec2_t[2];
32
float fgColor[4]; /* foreground color, default white */
33
float gdColor[4]; /* gradient color, default gray */
34
float bgColor[4]; /* background color, default gray */
35
int size; /* size of text, default 12 */
36
int shadow; /* shadow text? default 0 */
37
int gradient; /* gradient? default 0 */
38
int italic; /* italic amount, defaul 0 */
39
int bold; /* bold text? */
40
int region; /* do we have a text region */
41
int regionX; /* lower left x */
42
int regionY; /* lower left y */
43
int regionW; /* text region w */
44
int regionH; /* text region h */
45
float tIncX; /* used for texture coords, x axis amount to move */
46
float tIncY; /* used for texture coords, y axis amount to move */
47
int blockRow; /* characters per row */
48
int blockCol; /* characters per col */
49
unsigned int texId; /* texture id */
50
float zdepth; //third dimension , depth of fonts
62
Loads up out font from the passed image file name.
65
int fontLoad (char *name);
70
Same as above but it loads a custom font map with row chars per row and col
74
int fontLoadEx (char *name, int row, int col);
79
Draws a string at (xpos, ypos) in the applications window.
82
void fontDrawString (int xpos, int ypos, char *s,int width,...);
87
Sets up a font region. Upper left corner is described by (xpos, ypos).
88
The region is w units wide and h units tall.
91
void fontRegion (int xpos, int ypos, int w, int h);
99
void fontSize (int size);
102
void fontzdepth(float zdepth);
111
void fontShadow (void);
119
void fontGradient (void);
122
fontColor*, fontShadowColor*, fonrGradientColor*
124
Sets color for various operations.
127
void fontColor (float r, float g, float b);
128
void fontColorA (float r, float g, float b, float a);
129
void fontColorp (float *clr);
130
void fontColorAp (float *clr);
131
void fontShadowColor (float r, float g, float b);
132
void fontShadowColorA (float r, float g, float b, float a);
133
void fontShadowColorp (float *clr);
134
void fontShadowColorAp (float *clr);
135
void fontGradientColor (float r, float g, float b);
136
void fontGradientColorA (float r, float g, float b, float a);
137
void fontGradientColorp (float *clr);
138
void fontGradientColorAp (float *clr);