]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Support BGR and BGRA as texture formats through swizzling
[libs/gl.git] / source / texture.h
index adcfa76b7245276078af013622f343dca8ac65f0..6c0fbf2574b6cb6f8a897e62f0977b8db9486e4f 100644 (file)
@@ -64,7 +64,8 @@ protected:
        {
                NO_SWIZZLE,
                R_TO_LUMINANCE,
-               RG_TO_LUMINANCE_ALPHA
+               RG_TO_LUMINANCE_ALPHA,
+               RGB_TO_BGR
        };
 
        unsigned id;
@@ -83,9 +84,8 @@ public:
        ~Texture();
 
 protected:
-       static DataType get_alloc_type(PixelFormat);
        void set_internal_format(PixelFormat);
-       PixelFormat get_upload_format(PixelFormat) const;
+       PixelComponents get_upload_components(PixelComponents) const;
        void apply_swizzle();
        void set_parameter_i(GLenum, int) const;