diff options
author | Julien Gouesse <[email protected]> | 2013-03-09 10:09:22 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2013-03-09 10:09:22 +0100 |
commit | 59a56df1e89076577753e9484e5c2bfb2a5115cd (patch) | |
tree | 651b6c92b480068725e0d69970759cb64cd31a3f /ardor3d-core | |
parent | a4614dc6c745ab9eaa4065713e014154783feb4c (diff) |
Fixes GeneratedTexturesExample (several rewind() calls were missing in the API)
Diffstat (limited to 'ardor3d-core')
-rw-r--r-- | ardor3d-core/src/main/java/com/ardor3d/image/util/GeneratedImageFactory.java | 6 |
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); } /** |