]> git.jsancho.org Git - lugaru.git/blob - Source/TGALoader.h
62e90b05f1daaa7314afed5c0f85578e7c12f80e
[lugaru.git] / Source / TGALoader.h
1 #ifndef _TGA_LOADER_H_
2 #define _TGA_LOADER_H_
3
4 #ifdef _MSC_VER
5 #pragma once
6 #endif
7
8
9 /**> HEADER FILES <**/
10 #include <stdlib.h>
11 #include <stdio.h>
12 #include <string.h>
13 #ifdef WIN32
14 #define WIN32_LEAN_AND_MEAN
15 #define Polygon WinPolygon
16 #include <windows.h>
17 #undef Polygon
18 #include <gl/gl.h>
19 #else
20 #include "gamegl.h"
21 //      #include "MoreFilesX.h"
22 #endif
23
24 //#include <stdbool.h>
25 //#include <QuickTime.h>
26
27 /**> DATA STRUCTURES <**/
28 typedef struct TGAImageRec
29 {
30         GLubyte *data;          // Image Data (Up To 32 Bits)
31         GLuint  bpp;            // Image Color Depth In Bits Per Pixel.
32         GLuint  sizeX;
33         GLuint  sizeY;
34 }       TGAImageRec;
35
36 bool upload_image(const unsigned char* filePath, bool hasalpha);
37
38 /**> FUNCTION PROTOTYPES <**/
39 TGAImageRec*    LoadTGA( char *filename );
40
41
42 #endif
43