]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture1d.cpp
Depracate the srgb parameter of Texture::image functions
[libs/gl.git] / source / texture1d.cpp
index 553d4ffa8ab265f26f7d685b2c510a51bbb52286..592e4d77d81e961a8e08a617f4f78400dee43a68 100644 (file)
@@ -119,7 +119,7 @@ void Texture1D::sub_image(unsigned level, int x, unsigned wd, PixelComponents co
        sub_image(level, x, wd, data);
 }
 
-void Texture1D::image(const Graphics::Image &img, unsigned lv, bool srgb)
+void Texture1D::image(const Graphics::Image &img, unsigned lv)
 {
        if(img.get_height()!=1)
                throw incompatible_data("Texture1D::image");
@@ -127,7 +127,7 @@ void Texture1D::image(const Graphics::Image &img, unsigned lv, bool srgb)
        unsigned w = img.get_width();
        PixelFormat fmt = pixelformat_from_image(img);
        if(width==0)
-               storage(make_pixelformat(get_components(fmt), get_component_type(fmt), srgb), w, lv);
+               storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv);
        else if(w!=width)
                throw incompatible_data("Texture1D::image");