X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=image.hpp;h=5a75b0daa6add203c96c2f155ca44638c1ba0600;hp=caa951c4974e4b26187f2306dcd5b562d90a495b;hb=d0c631f46c6db417e013b1bc0edec24cb9c2824a;hpb=0291188124d08368ce28b308482604218bd75393 diff --git a/image.hpp b/image.hpp index caa951c..5a75b0d 100644 --- a/image.hpp +++ b/image.hpp @@ -11,6 +11,7 @@ class Image { public: Image(const std::string &path); + Image(const unsigned char *data, size_t length, const char *formatHint); ~Image(); unsigned char *data() const; GLfloat width() const; @@ -20,6 +21,7 @@ class Image { GLenum type() const; private: #ifdef __APPLE__ + void initWithImageRef(CGImageRef ref); CFDataRef dataRef; CGBitmapInfo info; CGImageAlphaInfo alphaInfo;