]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Require texture data to be uploaded in a format matching the storage
[libs/gl.git] / source / texture.h
index 71192fef06c42416b8a9dadc26f1fe2109626a67..30c6496a5658525e00a6ac59374996c25f08d7e3 100644 (file)
@@ -64,12 +64,14 @@ protected:
        {
                NO_SWIZZLE,
                R_TO_LUMINANCE,
-               RG_TO_LUMINANCE_ALPHA
+               RG_TO_LUMINANCE_ALPHA,
+               RGB_TO_BGR
        };
 
        unsigned id;
        GLenum target;
-       PixelFormat ifmt;
+       PixelFormat format;
+       PixelFormat storage_fmt;
        FormatSwizzle swizzle;
        bool auto_gen_mipmap;
        Sampler default_sampler;
@@ -83,8 +85,7 @@ public:
        ~Texture();
 
 protected:
-       void set_internal_format(PixelFormat);
-       PixelComponents get_upload_components(PixelComponents) const;
+       void set_format(PixelFormat);
        void apply_swizzle();
        void set_parameter_i(GLenum, int) const;