]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.cpp
Move filter heuristic for mipmap levels to Texture::Loader
[libs/gl.git] / source / texture2d.cpp
index 7586862591675534a50bf13b076021701ec004b0..abdfe0d1569ca50d7f06e15531e5e01997cb47bc 100644 (file)
@@ -143,10 +143,7 @@ void Texture2D::image(const Graphics::Image &img, unsigned lv, bool srgb, bool f
        unsigned h = img.get_height();
        PixelFormat fmt = pixelformat_from_graphics(img.get_format());
        if(width==0)
-       {
-               unsigned l = (is_mipmapped(min_filter) ? lv : 1);
-               storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w, h, l);
-       }
+               storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w, h, lv);
        else if(w!=width || h!=height || (lv && lv!=levels))
                throw incompatible_data("Texture2D::image");