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");