[DEV] disable force of pow 2 image in Graphic card

This commit is contained in:
Edouard DUPIN 2021-05-29 00:49:15 +02:00
parent c6c92f86f6
commit ec312fbe09

View File

@ -181,11 +181,12 @@ public class ResourceTexture2 extends Resource {
Log.debug(" size=" + image.getSize());
this.data = image;
this.realImageSize = this.data.getSize();
final Vector2i compatibilityHWSize = new Vector2i(Tools.nextP2(this.realImageSize.x()), Tools.nextP2(this.realImageSize.y()));
if (!this.realImageSize.equals(compatibilityHWSize)) {
Log.warning("RESIZE Image for HArwareCompatibility:" + this.realImageSize + " => " + compatibilityHWSize);
this.data.resize(compatibilityHWSize.x(), compatibilityHWSize.y());
}
// Disable compatibility size for embended ...
// final Vector2i compatibilityHWSize = new Vector2i(Tools.nextP2(this.realImageSize.x()), Tools.nextP2(this.realImageSize.y()));
// if (!this.realImageSize.equals(compatibilityHWSize)) {
// Log.warning("RESIZE Image for HArwareCompatibility:" + this.realImageSize + " => " + compatibilityHWSize);
// this.data.resize(compatibilityHWSize.x(), compatibilityHWSize.y());
// }
flush();
}