Image: request mipmaps to be re-generated if image data is modified

- fixes ImageRaster modification not updating mipmaps bug
This commit is contained in:
shadowislord 2015-02-22 15:43:54 -05:00
parent 50f0eca3e6
commit d6a4ba41b4

View File

@ -427,6 +427,18 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
return needGeneratedMips; return needGeneratedMips;
} }
/**
* Sets the update needed flag, while also checking if mipmaps
* need to be regenerated.
*/
@Override
public void setUpdateNeeded() {
super.setUpdateNeeded();
if (!isGeneratedMipmapsRequired() && !hasMipmaps()) {
setNeedGeneratedMipmaps();
}
}
/** /**
* Determine if the image is NPOT. * Determine if the image is NPOT.
* *