Add support for partial Image updates via Image:replacePixels(imagedata [, sliceindex, mipmap, x, y]) with a smaller-sized ImageData.

Also updated the argument order of Canvas:newImageData to match: (sliceindex, mipmap, x, y, w, h).
This commit is contained in:
Alex Szpakowski
2018-01-10 22:52:28 -04:00
parent 22f72c7da6
commit 2459752c06
5 changed files with 38 additions and 28 deletions
+1 -4
View File
@@ -133,10 +133,7 @@ void Image::loadData()
love::image::ImageDataBase *id = data.get(slice, mip);
if (id != nullptr)
{
Rect r = {0, 0, id->getWidth(), id->getHeight()};
uploadImageData(id, mip, slice, r);
}
uploadImageData(id, mip, slice, 0, 0);
}
w = std::max(w / 2, 1);