-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething that is supposed to work, but doesn't. More severe than a "defect".Something that is supposed to work, but doesn't. More severe than a "defect".
Milestone
Description
These two constructors on Image class behave differently!
jmonkeyengine/jme3-core/src/main/java/com/jme3/texture/Image.java
Lines 749 to 762 in f92a73f
| public Image(Format format, int width, int height, int depth, ArrayList<ByteBuffer> data, | |
| int[] mipMapSizes, ColorSpace colorSpace) { | |
| this(); | |
| if (mipMapSizes != null) { | |
| if (mipMapSizes.length <= 1) { | |
| mipMapSizes = null; | |
| } else { | |
| needGeneratedMips = false; | |
| mipsWereGenerated = true; | |
| } | |
| } | |
jmonkeyengine/jme3-core/src/main/java/com/jme3/texture/Image.java
Lines 805 to 816 in f92a73f
| public Image(Format format, int width, int height, ByteBuffer data, | |
| int[] mipMapSizes, ColorSpace colorSpace) { | |
| this(); | |
| if (mipMapSizes != null && mipMapSizes.length <= 1) { | |
| mipMapSizes = null; | |
| } else { | |
| needGeneratedMips = false; | |
| mipsWereGenerated = true; | |
| } | |
Look at needGeneratedMips and mipsWereGenerated flags, if mipMapSizes is null the first one won't modify the flags but the second one will do (I belive it is wrongly setting mipsWereGenerated = true)
Forum post:
https://hub.jmonkeyengine.org/t/issue-in-image-class-bug/46297
Metadata
Metadata
Assignees
Labels
bugSomething that is supposed to work, but doesn't. More severe than a "defect".Something that is supposed to work, but doesn't. More severe than a "defect".