Skip to content

Commit 7f927f0

Browse files
authored
Fix #1883 (Image class wrongly setting GL mips flags inside the constructor) (#1885)
1 parent 1e237f3 commit 7f927f0

File tree

1 file changed

+8
-6
lines changed
  • jme3-core/src/main/java/com/jme3/texture

1 file changed

+8
-6
lines changed

jme3-core/src/main/java/com/jme3/texture/Image.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2021 jMonkeyEngine
2+
* Copyright (c) 2009-2022 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -807,11 +807,13 @@ public Image(Format format, int width, int height, ByteBuffer data,
807807

808808
this();
809809

810-
if (mipMapSizes != null && mipMapSizes.length <= 1) {
811-
mipMapSizes = null;
812-
} else {
813-
needGeneratedMips = false;
814-
mipsWereGenerated = true;
810+
if (mipMapSizes != null) {
811+
if (mipMapSizes.length <= 1) {
812+
mipMapSizes = null;
813+
} else {
814+
needGeneratedMips = false;
815+
mipsWereGenerated = true;
816+
}
815817
}
816818

817819
setFormat(format);

0 commit comments

Comments
 (0)