Mipmapping models
[opengl.git] / image.hpp
index 41b45ba3ac01ade461d54741c7e997560fcedcb6..f87fd98a7370a7b3fd546ec7c9760cd8a0008eb9 100644 (file)
--- a/image.hpp
+++ b/image.hpp
 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;
                GLfloat height() const;
-               GLuint format() const;
+               GLenum format() const;
+               GLint internalFormat() const;
+               GLenum type() const;
        private:
                #ifdef __APPLE__
+               void initWithImageRef(CGImageRef ref);
                CFDataRef dataRef;
                CGBitmapInfo info;
                CGImageAlphaInfo alphaInfo;
                CGColorSpaceRef colorSpace;
                GLfloat _width, _height;
+               size_t bitsPerComponent;
+               bool usesFloat() const;
                #endif
 };