]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture3d.cpp
Add an srgb flag to pixelformat_from_image
[libs/gl.git] / source / core / texture3d.cpp
index 03a64f1cf83abdf8b4de758f8f1c2a44075b74a8..b8e728cfa7ad3a9c64e13ee972996140c5eb864e 100644 (file)
@@ -108,9 +108,7 @@ void Texture3D::image(const Graphics::Image &img, unsigned lv)
        unsigned d = h/w;
        h = w;
 
-       PixelFormat fmt = pixelformat_from_image(img);
-       storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, h, d, lv);
-
+       storage(pixelformat_from_image(img, use_srgb_format), w, h, d, lv);
        image(0, img.get_pixels());
 }