]> git.lizzy.rs Git - shadowclad.git/blob - tga.h
Link libassimp and test importing a 3ds file
[shadowclad.git] / tga.h
1 #ifndef TGA_H_
2 #define TGA_H_
3
4 #include <GL/gl.h>
5
6 #pragma pack(push, 1)
7 typedef struct {
8         GLubyte id_length;
9         GLbyte color_map_type;
10         GLbyte image_type;
11         GLushort color_map_start;
12         GLushort color_map_length;
13         GLubyte color_map_bpp;
14         GLushort x_origin;
15         GLushort y_origin;
16         GLushort image_width;
17         GLushort image_height;
18         GLubyte image_bpp;
19         GLbyte image_descriptor;
20 } TGAheader;
21 #pragma pack(pop)
22
23 typedef struct {
24         TGAheader header;
25         GLenum image_format;
26         GLint image_components;
27         GLbyte* bytes;
28 } TGAimage;
29
30 TGAimage* read_tga(const char* path);
31
32 #endif