]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturecube.cpp
Move filter heuristic for mipmap levels to Texture::Loader
[libs/gl.git] / source / texturecube.cpp
index 14ddf43d41c2cdc076e4489a62e2ed2e7341dd36..bac60ffdd9612317ecfd3af6251ff78ef1aa3c93 100644 (file)
@@ -176,10 +176,7 @@ void TextureCube::image(const Graphics::Image &img, unsigned lv, bool srgb)
 
        PixelFormat fmt = pixelformat_from_graphics(img.get_format());
        if(size==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!=size || h!=size)
                throw incompatible_data("TextureCube::image");