From 2007cd5543f87389b26ef4b4dc300364ec50e50d Mon Sep 17 00:00:00 2001 From: Nehon Date: Sun, 25 Jan 2015 22:58:20 +0100 Subject: [PATCH] fixed inverted red and blue channels in OffScenePanel and ScenePreviewProcessor , has the default format of readFrameBuffer has been set to RGBA in jme core --- sdk/jme3-core/src/com/jme3/gde/core/scene/OffScenePanel.java | 2 +- .../src/com/jme3/gde/core/scene/ScenePreviewProcessor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/OffScenePanel.java b/sdk/jme3-core/src/com/jme3/gde/core/scene/OffScenePanel.java index 652e935f3..f39969aed 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/scene/OffScenePanel.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/OffScenePanel.java @@ -219,7 +219,7 @@ public class OffScenePanel extends javax.swing.JPanel implements SceneProcessor public void postFrame(FrameBuffer fb) { // cpuBuf.clear(); - SceneApplication.getApplication().getRenderer().readFrameBuffer(offBuffer, cpuBuf); + SceneApplication.getApplication().getRenderer().readFrameBufferWithFormat(offBuffer, cpuBuf,Format.BGRA8); // // // copy native memory to java memory // cpuBuf.clear(); diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/ScenePreviewProcessor.java b/sdk/jme3-core/src/com/jme3/gde/core/scene/ScenePreviewProcessor.java index 63068c018..f827eacff 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/scene/ScenePreviewProcessor.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/ScenePreviewProcessor.java @@ -169,7 +169,7 @@ public class ScenePreviewProcessor implements SceneProcessor { public void postFrame(FrameBuffer fb) { if (currentPreviewRequest != null) { cpuBuf.clear(); - SceneApplication.getApplication().getRenderer().readFrameBuffer(offBuffer, cpuBuf); + SceneApplication.getApplication().getRenderer().readFrameBufferWithFormat(offBuffer, cpuBuf, Format.BGRA8); // copy native memory to java memory cpuBuf.clear();