X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=image.hpp;h=41b45ba3ac01ade461d54741c7e997560fcedcb6;hp=b6d79201bffddcca414605ef7d11ef1ff6104146;hb=d80972d96e5fcd444657f937ab2700039efa83d2;hpb=c44e69ec78367fb2957324026894aef970f2481a 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