]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture1d.cpp
Remove the deprecated ProgramBuilder class
[libs/gl.git] / source / texture1d.cpp
index 553d4ffa8ab265f26f7d685b2c510a51bbb52286..742857be725b4ed205b369c43d823f5b0812af14 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,11 +127,11 @@ 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");
 
-       image(0, img.get_data());
+       image(0, img.get_pixels());
 }
 
 unsigned Texture1D::get_n_levels() const