Missing library from test link list.
[dcpomatic.git] / hacks / gl / image.cc
1 #include "image.h"
2 #include "image_loader.h"
3
4 Image::Image()
5 {
6 }
7
8 Image::Image(wxString path)
9 {
10     load(path);
11 }
12
13 void Image::load(wxString path)
14 {
15     ID=loadImage(path, &width, &height, &textureWidth, &textureHeight);
16
17     tex_coord_x = (float)width/(float)textureWidth;
18     tex_coord_y = (float)height/(float)textureHeight;
19 }
20
21 GLuint* Image::getID()
22 {
23     return ID;
24 }
25
26 Image::~Image()
27 {
28     glDeleteTextures (1, ID);
29 }