]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Depracate the srgb parameter of Texture::image functions
[libs/gl.git] / source / texture.h
index 6ee0b8a107754e83c7bf2d49b4fe6f68f2e11db4..c4e72031ebb174e372877dfd14972449e80d9178 100644 (file)
@@ -30,7 +30,6 @@ protected:
        {
        protected:
                unsigned levels;
-               bool srgb;
 
        public:
                Loader(Texture &);
@@ -44,6 +43,8 @@ protected:
 
        private:
                void external_image(const std::string &);
+               void external_image_srgb(const std::string &);
+               void external_image_common(const std::string &);
                void filter(TextureFilter);
                void generate_mipmap(bool);
                void image_data(const std::string &);
@@ -76,6 +77,7 @@ protected:
        PixelFormat format;
        PixelFormat storage_fmt;
        FormatSwizzle swizzle;
+       bool use_srgb_format;
        bool auto_gen_mipmap;
        Sampler default_sampler;
 
@@ -135,19 +137,16 @@ public:
        DEPRECATED void set_compare_func(Predicate);
 
        /// Loads a Graphics::Image from a file and uploads it to the texture.
-       virtual void load_image(const std::string &, bool srgb = false);
+       virtual void load_image(const std::string &, unsigned = 0);
 
-       virtual void load_image(const std::string &, unsigned, bool srgb = false);
+       DEPRECATED void load_image(const std::string &, bool srgb);
 
        /** Uploads an image to the texture.  If storage has not been defined, it
        will be set to match the image.  Otherwise the image must be compatible
-       with the defined storage.  Semantics depend on the type of texture.
+       with the defined storage.  Semantics depend on the type of texture.  */
+       virtual void image(const Graphics::Image &, unsigned = 0) = 0;
 
-       If srgb is true and storage is determined by this call, then an sRGB pixel
-       format will be used. */
-       virtual void image(const Graphics::Image &, bool srgb = false);
-
-       virtual void image(const Graphics::Image &, unsigned, bool srgb = false) = 0;
+       DEPRECATED void image(const Graphics::Image &, bool srgb);
 
        GLenum get_target() const { return target; }
        unsigned get_id() const { return id; }