fixed inverted red and blue channels in OffScenePanel and ScenePreviewProcessor , has the default format of readFrameBuffer has been set to RGBA in jme core
This commit is contained in:
parent
384a60b118
commit
2007cd5543
@ -219,7 +219,7 @@ public class OffScenePanel extends javax.swing.JPanel implements SceneProcessor
|
|||||||
|
|
||||||
public void postFrame(FrameBuffer fb) {
|
public void postFrame(FrameBuffer fb) {
|
||||||
// cpuBuf.clear();
|
// cpuBuf.clear();
|
||||||
SceneApplication.getApplication().getRenderer().readFrameBuffer(offBuffer, cpuBuf);
|
SceneApplication.getApplication().getRenderer().readFrameBufferWithFormat(offBuffer, cpuBuf,Format.BGRA8);
|
||||||
//
|
//
|
||||||
// // copy native memory to java memory
|
// // copy native memory to java memory
|
||||||
// cpuBuf.clear();
|
// cpuBuf.clear();
|
||||||
|
@ -169,7 +169,7 @@ public class ScenePreviewProcessor implements SceneProcessor {
|
|||||||
public void postFrame(FrameBuffer fb) {
|
public void postFrame(FrameBuffer fb) {
|
||||||
if (currentPreviewRequest != null) {
|
if (currentPreviewRequest != null) {
|
||||||
cpuBuf.clear();
|
cpuBuf.clear();
|
||||||
SceneApplication.getApplication().getRenderer().readFrameBuffer(offBuffer, cpuBuf);
|
SceneApplication.getApplication().getRenderer().readFrameBufferWithFormat(offBuffer, cpuBuf, Format.BGRA8);
|
||||||
|
|
||||||
// copy native memory to java memory
|
// copy native memory to java memory
|
||||||
cpuBuf.clear();
|
cpuBuf.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user