Missing library from test link list.
[dcpomatic.git] / hacks / gl / image.h
1 #ifndef _image_
2 #define _image_
3
4 // include OpenGL
5 #ifdef __WXMAC__
6 #include "OpenGL/gl.h"
7 #else
8 #include <GL/gl.h>
9 #endif
10
11 #include "wx/wx.h"
12
13 class Image
14 {
15     GLuint* ID;
16     
17 public:
18
19         /*
20          * it is preferable to use textures that are a power of two. this loader will automatically
21          * resize texture to be a power of two, filling the remaining areas with black.
22          * width/height are the width of the actual loaded image.
23          * textureWidth/Height are the total width of the texture, including black filling.
24          * tex_coord_x/y are the texture coord parameter you must give OpenGL when rendering
25          * to get only the image, without the black filling.
26          */
27     int width, height, textureWidth, textureHeight;
28     float tex_coord_x, tex_coord_y;
29     
30     GLuint* getID();
31     Image();
32     Image(wxString path);
33     ~Image();
34     void load(wxString path);
35         
36 };
37
38
39 #endif