Modify your Tga.H as follows:
#ifndef Tga_H
#define Tga_H
#include "Texture.h"
struct TGAHeader
{
GLubyte Header[12];
} ;
struct TGA
{
GLubyte header[6];
GLuint bytesPerPixel;
GLuint imageSize;
GLuint temp;
GLuint type;
GLuint Height;
GLuint Width;
GLuint Bpp;
} ;
extern TGAHeader tgaheader;
extern TGA tga;
extern GLubyte uTGAcompare[12];
extern GLubyte cTGAcompare[12];
bool LoadTGA(Texture * , char * );
bool LoadUncompressedTGA(Texture *, char *, FILE *);
bool LoadCompressedTGA(Texture *, char *, FILE *);
#endif
Add the following lines to your TGALoader.cpp file:
TGAHeader tgaheader;
TGA tga;
GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0};
GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0};
source
share