]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture3d.cpp
Move filter heuristic for mipmap levels to Texture::Loader
[libs/gl.git] / source / texture3d.cpp
index c107fd7451a16a6f2f9c5368e065d20442249277..48b358c2edd2ad0e2a899138713b8bb5d82135c9 100644 (file)
@@ -190,10 +190,7 @@ void Texture3D::image(const Graphics::Image &img, unsigned lv, bool srgb)
 
        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, d, l);
-       }
+               storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w, h, d, lv);
        else if(w!=width || h!=height || d!=depth)
                throw incompatible_data("Texture3D::load_image");