diff options
Diffstat (limited to 'sdl/gltools.h')
-rw-r--r-- | sdl/gltools.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sdl/gltools.h b/sdl/gltools.h new file mode 100644 index 0000000..b960abd --- /dev/null +++ b/sdl/gltools.h @@ -0,0 +1,32 @@ +#ifndef _GLTOOLS_H_ +#define _GLTOOLS_H_ + +/* this is the targa header, pragmas are needed to do the voodoo magic */ +/* http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/ */ +#pragma pack(1) +typedef struct +{ + GLbyte identsize; /* Size of id field that follows header (0) */ + GLbyte imageType; /* 0 = none, 1 = indexed, 2 = rgb, 3 = grey, +8 = rle */ + GLbyte colorMapType; /* 0 = none, 1 = paletted */ + unsigned short colorMapStart; /* first colour map entry */ + unsigned short colorMapLength; /* number of colors */ + unsigned char colorMapBits; /* bits per palette entry */ + unsigned short xstart; /* image x origin */ + unsigned short ystart; /* image y origin */ + unsigned short width; /* width in pixels */ + unsigned short height; /* height in pixels */ + GLbyte bits; /* bits per pixel (8 16, 24, 32) */ + GLbyte descriptor; /* image descriptor */ +} TGAHEADER; +#pragma pack(1) + +/* function prototypes */ +GLint gltWriteTGA(const char *); +GLbyte *gltLoadTGA(const char *, GLint *, GLint *, GLint *, GLenum *); +void gltDrawUnitAxes(void); +void gltDrawTorus(GLfloat, GLfloat, GLint, GLint); +void DrawJet(int); + +#endif + |