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

- fixes ImageRaster modification not updating mipmaps bug
experimental
shadowislord 10 years ago
parent 50f0eca3e6
commit d6a4ba41b4
  1. 12
      jme3-core/src/main/java/com/jme3/texture/Image.java

@ -427,6 +427,18 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
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.
*

Loading…
Cancel
Save