X-Git-Url: http://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=image.hpp;fp=image.hpp;h=41b45ba3ac01ade461d54741c7e997560fcedcb6;hp=b6d79201bffddcca414605ef7d11ef1ff6104146;hb=a03f2bc751bbd7f91cbc2f52d2f0f6e753d6f776;hpb=210d1b08cec40845d849e89baea8a9cc96917f60 diff --git a/image.hpp b/image.hpp index b6d7920..41b45ba 100644 --- a/image.hpp +++ b/image.hpp @@ -1,3 +1,6 @@ +#ifndef IMAGE_HPP +#define IMAGE_HPP + #include #include #ifdef __APPLE__ @@ -9,12 +12,18 @@ class Image { public: Image(const std::string &path); ~Image(); - unsigned char *data(); + unsigned char *data() const; GLfloat width() const; GLfloat height() const; + GLuint format() const; private: #ifdef __APPLE__ CFDataRef dataRef; + CGBitmapInfo info; + CGImageAlphaInfo alphaInfo; + CGColorSpaceRef colorSpace; GLfloat _width, _height; #endif }; + +#endif