From 7ff428b64fce9ba13770ca63defbbccf9cbd6a42 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 27 Dec 2017 11:03:32 -0400 Subject: [PATCH] Fix love.graphics.newImage(compressedimagedata, settings) to respect the mipmaps boolean flag instead of always using the compressed texture's mipmaps if it has any. --- src/modules/graphics/wrap_Graphics.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index db8794bcd..8bdf451b6 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -778,7 +778,7 @@ int w_newCubeImage(lua_State *L) slices.set(i, 0, faces[i]); } else - slices.add(data.second, 0, 0, true, true); + slices.add(data.second, 0, 0, true, settings.mipmaps); } else { @@ -836,7 +836,7 @@ int w_newCubeImage(lua_State *L) slices.set(i, 0, data.first); } else - slices.add(data.second, i, 0, false, true); + slices.add(data.second, i, 0, false, settings.mipmaps); } } @@ -890,7 +890,7 @@ int w_newArrayImage(lua_State *L) if (data.first.get()) slices.set(slice, 0, data.first); else - slices.add(data.second, slice, 0, false, true); + slices.add(data.second, slice, 0, false, settings.mipmaps); } } @@ -902,7 +902,7 @@ int w_newArrayImage(lua_State *L) if (data.first.get()) slices.set(0, 0, data.first); else - slices.add(data.second, 0, 0, true, true); + slices.add(data.second, 0, 0, true, settings.mipmaps); } settings = w__optImageSettings(L, 2, settings); @@ -954,7 +954,7 @@ int w_newVolumeImage(lua_State *L) if (data.first.get()) slices.set(layer, 0, data.first); else - slices.add(data.second, layer, 0, false, true); + slices.add(data.second, layer, 0, false, settings.mipmaps); } } @@ -973,7 +973,7 @@ int w_newVolumeImage(lua_State *L) slices.set(i, 0, layers[i]); } else - slices.add(data.second, 0, 0, true, true); + slices.add(data.second, 0, 0, true, settings.mipmaps); } settings = w__optImageSettings(L, 2, settings); @@ -1007,7 +1007,7 @@ int w_newImage(lua_State *L) if (data.first.get()) slices.set(0, 0, data.first); else - slices.add(data.second, 0, 0, false, true); + slices.add(data.second, 0, 0, false, settings.mipmaps); } settings = w__optImageSettings(L, 2, settings);