PBR checkpoint
[opengl.git] / image.hpp
1 #ifndef IMAGE_HPP
2 #define IMAGE_HPP
3
4 #include <iostream>
5 #include <fstream>
6 #ifdef __APPLE__
7 #include <CoreGraphics/CoreGraphics.h>
8 #include <GL/glew.h>
9 #endif
10
11 class Image {
12         public:
13                 Image(const std::string &path);
14                 ~Image();
15                 unsigned char *data() const;
16                 GLfloat width() const;
17                 GLfloat height() const;
18                 GLuint format() const;
19         private:
20                 #ifdef __APPLE__
21                 CFDataRef dataRef;
22                 CGBitmapInfo info;
23                 CGImageAlphaInfo alphaInfo;
24                 CGColorSpaceRef colorSpace;
25                 GLfloat _width, _height;
26                 #endif
27 };
28
29 #endif