X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexturecube.cpp;h=03e65167d73fee7a1d89ba9ea3cea7ef2c68d81d;hp=ee8c71c5b0399e88f7c15b375878cf64623a4472;hb=40e1eba6c489e11a4c9b8865ddcd3ec3d9f83818;hpb=03d3984ecd2c4e7c38b6a62b4b7a81bab69f8d40 diff --git a/source/texturecube.cpp b/source/texturecube.cpp index ee8c71c5..03e65167 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -161,7 +161,7 @@ void TextureCube::image(const Graphics::Image &img, bool srgb) PixelFormat fmt = pixelformat_from_graphics(img.get_format()); if(size==0) { - unsigned l = (is_mipmapped(min_filter) ? 0 : 1); + unsigned l = (is_mipmapped(min_filter) ? mipmap_levels ? mipmap_levels : 0 : 1); storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w, l); } else if(w!=size || h!=size)