Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGALoader.h

Go to the documentation of this file.
00001 
00006 #ifndef __TGA_H__
00007 #define __TGA_H__
00008 #include <stdio.h>                                                                              // Standard I/O header
00009 #include <iostream>
00010 #ifdef __APPLE__
00011 #include <OpenGL/gl.h>
00012 #else
00013         #include <GL/glut.h>
00014 #endif
00015 #include "Texture.h"
00016 
00017 /*
00018 * This file came from Alex Klaminsky it has been changed to 
00019 * fit into this implementation.
00020 * @author Hannes Ricklefs
00021 */
00022 
00023 namespace ParticleSystems {
00024 
00026 
00029 typedef struct
00030 {
00031         GLubyte Header[12];                                                                     
00032 } TGAHeader;
00033 
00035 
00038 typedef struct
00039 {
00041         GLubyte         header[6];                                                              
00043         GLuint          bytesPerPixel;                                                   
00045         GLuint          imageSize;                                                               
00047         GLuint          temp;                                                                    
00048         GLuint          type;
00050         GLuint          Height;                                                                 
00052         GLuint          Width;                                                                   
00054         GLuint          Bpp;                                                                    
00055 } TGA;
00056 
00058 
00062 class TGALoader {
00063 
00064         public:
00066 
00069                 TGALoader();
00070                 
00072 
00075                 ~TGALoader();
00076                 
00078 
00083                 bool LoadTGA(Texture * texture, char * filename);
00084                 
00086 
00089                 TGAHeader tgaheader;                                                                    
00090                 
00092 
00095                 TGA tga;        
00096                 
00098 
00101                 GLubyte uTGAcompare[12];        
00102                 
00104 
00107                 GLubyte cTGAcompare[12]; 
00108         
00109         private:
00111 
00117                 bool LoadUncompressedTGA(Texture *, char *, FILE *);    
00118                 
00120 
00126                 bool LoadCompressedTGA(Texture *, char *, FILE *);      
00127         
00128 };
00129 }
00130 #endif
00131 
00132 
00133 
00134 
00135 
00136 

Generated on Thu Mar 24 11:05:02 2005 for ParticleSystem by  doxygen 1.4.1