X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=image.hpp;fp=image.hpp;h=6864553c316b702efb124e375f0efa586e5a956e;hp=caa951c4974e4b26187f2306dcd5b562d90a495b;hb=d381f617bef400fc157edf782008cafb018ed594;hpb=c0811ee866ca2b6d002c15394ea5d4b7a1067a80 diff --git a/image.hpp b/image.hpp index caa951c..6864553 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); ~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;