]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture1d.cpp
Move filter heuristic for mipmap levels to Texture::Loader
[libs/gl.git] / source / texture1d.cpp
index d09a9570306e077b771d31dce598757e2fc715fb..38dc8a8bde5644ef5841bd52d7ae5636a7e40bbf 100644 (file)
@@ -110,10 +110,7 @@ void Texture1D::image(const Graphics::Image &img, unsigned lv, bool srgb)
        unsigned w = img.get_width();
        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, l);
-       }
+               storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w, lv);
        else if(w!=width)
                throw incompatible_data("Texture1D::image");