X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture3d.cpp;h=ed5619cb4aed30f567cf7e3e063a7ad05f60fd27;hp=36fdfa0f3b8f6b591fd19b7f4d4047fa45c0ba06;hb=40e1eba6c489e11a4c9b8865ddcd3ec3d9f83818;hpb=03d3984ecd2c4e7c38b6a62b4b7a81bab69f8d40 diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 36fdfa0f..ed5619cb 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -188,7 +188,7 @@ void Texture3D::image(const Graphics::Image &img, bool srgb) PixelFormat fmt = pixelformat_from_graphics(img.get_format()); if(width==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, h, d, l); } else if(w!=width || h!=height || d!=depth)