X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=abdfe0d1569ca50d7f06e15531e5e01997cb47bc;hb=47f817343df1d06d91a4f7c4d5b47df40b24366c;hp=7586862591675534a50bf13b076021701ec004b0;hpb=d6db27e633b1b8850fb093a8e5fad439ac3b0465;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 75868625..abdfe0d1 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -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");