tga.h
1 #pragma once
2 
3 #include <gl/glaux.h>
4 #include <stdio.h>
5 
6 namespace VoxelFarm
7 {
9  struct TGAHeader
10  {
11  GLubyte Header[12];
12  };
13 
15  struct TGA
16  {
17  GLubyte header[6];
18  GLuint bytesPerPixel;
19  GLuint imageSize;
20  GLuint temp;
21  GLuint type;
22  GLuint Height;
23  GLuint Width;
24  GLuint Bpp;
25  };
26 
28  struct TGATexture
29  {
30  GLubyte * imageData;
31  GLuint bpp;
32  GLuint width;
33  GLuint height;
34  GLuint texID;
35  GLuint type;
36  };
37 
39  bool LoadUncompressedTGA(TGATexture* texture, const char * filename, FILE * fTGA);
41  bool LoadCompressedTGA(TGATexture* texture, const char * filename, FILE * fTGA);
43  bool LoadTGA(TGATexture* texture, const char* filename);
44 
46  extern GLubyte uTGAcompare[12];
48  extern GLubyte cTGAcompare[12];
49 
50 }
Contains all classes and functions for the VoxelFarm engine.
GLubyte uTGAcompare[12]
TGA header bytes.
Describes a TGA file.
Definition: tga.h:15
GLubyte cTGAcompare[12]
TGA header bytes.
bool LoadCompressedTGA(TGATexture *texture, const char *filename, FILE *fTGA)
Load compressed TGA file.
bool LoadTGA(TGATexture *texture, const char *filename)
Load TGA file.
bool LoadUncompressedTGA(TGATexture *texture, const char *filename, FILE *fTGA)
Load uncompressed TGA file.
Image information from TGA file.
Definition: tga.h:28
Header for TGA files.
Definition: tga.h:9