aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'ardor3d-core/src/main/java')
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/image/util/GeneratedImageFactory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/util/GeneratedImageFactory.java b/ardor3d-core/src/main/java/com/ardor3d/image/util/GeneratedImageFactory.java
index 3591455..6316b57 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/image/util/GeneratedImageFactory.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/image/util/GeneratedImageFactory.java
@@ -171,6 +171,7 @@ public abstract class GeneratedImageFactory {
}
final ByteBuffer dataBuf = BufferUtils.createByteBuffer(data.length);
dataBuf.put(data);
+ dataBuf.rewind();
dataList.add(dataBuf);
}
@@ -216,11 +217,12 @@ public abstract class GeneratedImageFactory {
}
}
out.put(data);
+ out.rewind();
dataList.add(out);
}
- return new Image(useAlpha ? ImageDataFormat.RGBA : ImageDataFormat.RGB, PixelDataType.UnsignedByte, lumImage
- .getWidth(), lumImage.getHeight(), dataList, null);
+ return new Image(useAlpha ? ImageDataFormat.RGBA : ImageDataFormat.RGB, PixelDataType.UnsignedByte,
+ lumImage.getWidth(), lumImage.getHeight(), dataList, null);
}
/**