]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture1d.cpp
Add an srgb flag to pixelformat_from_image
[libs/gl.git] / source / core / texture1d.cpp
index 3fd1ae0955e88c1d432219506fe960db9e4ecdd2..76ff946fc45959f58af87dfa93851c5c2f0a3327 100644 (file)
@@ -85,10 +85,7 @@ void Texture1D::image(const Graphics::Image &img, unsigned lv)
        if(img.get_height()!=1)
                throw incompatible_data("Texture1D::image");
 
-       unsigned w = img.get_width();
-       PixelFormat fmt = pixelformat_from_image(img);
-       storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv);
-
+       storage(pixelformat_from_image(img, use_srgb_format), img.get_width(), lv);
        image(0, img.get_pixels());
 }