aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-core
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2013-03-09 10:09:22 +0100
committerJulien Gouesse <[email protected]>2013-03-09 10:09:22 +0100
commit59a56df1e89076577753e9484e5c2bfb2a5115cd (patch)
tree651b6c92b480068725e0d69970759cb64cd31a3f /ardor3d-core
parenta4614dc6c745ab9eaa4065713e014154783feb4c (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.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);
}
/**