diff --git a/jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java b/jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java index b8d0f40d4..ad0172511 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java +++ b/jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java @@ -86,7 +86,7 @@ public class TestRenderToMemory extends SimpleApplication implements SceneProces private final ByteBuffer cpuBuf = BufferUtils.createByteBuffer(width * height * 4); private final byte[] cpuArray = new byte[width * height * 4]; private final BufferedImage image = new BufferedImage(width, height, - BufferedImage.TYPE_4BYTE_ABGR); + BufferedImage.TYPE_INT_BGR); private class ImageDisplay extends JPanel { @@ -159,10 +159,10 @@ public class TestRenderToMemory extends SimpleApplication implements SceneProces public void updateImageContents(){ cpuBuf.clear(); - renderer.readFrameBufferWithFormat(offBuffer, cpuBuf, Image.Format.BGRA8); + renderer.readFrameBuffer(offBuffer, cpuBuf); synchronized (image) { - Screenshots.convertScreenShot(cpuBuf, image); + Screenshots.convertScreenShot2(cpuBuf.asIntBuffer(), image); } if (display != null)