|
|
@ -300,7 +300,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { |
|
|
|
public void postFrame(FrameBuffer out) { |
|
|
|
public void postFrame(FrameBuffer out) { |
|
|
|
|
|
|
|
|
|
|
|
FrameBuffer sceneBuffer = renderFrameBuffer; |
|
|
|
FrameBuffer sceneBuffer = renderFrameBuffer; |
|
|
|
if (renderFrameBufferMS != null && !renderer.getCaps().contains(Caps.OpenGL31)) { |
|
|
|
if (renderFrameBufferMS != null && !renderer.getCaps().contains(Caps.OpenGL32)) { |
|
|
|
renderer.copyFrameBuffer(renderFrameBufferMS, renderFrameBuffer, true); |
|
|
|
renderer.copyFrameBuffer(renderFrameBufferMS, renderFrameBuffer, true); |
|
|
|
} else if (renderFrameBufferMS != null) { |
|
|
|
} else if (renderFrameBufferMS != null) { |
|
|
|
sceneBuffer = renderFrameBufferMS; |
|
|
|
sceneBuffer = renderFrameBufferMS; |
|
|
@ -443,7 +443,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { |
|
|
|
//antialiasing on filters only supported in opengl 3 due to depth read problem
|
|
|
|
//antialiasing on filters only supported in opengl 3 due to depth read problem
|
|
|
|
if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample)) { |
|
|
|
if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample)) { |
|
|
|
renderFrameBufferMS = new FrameBuffer(width, height, numSamples); |
|
|
|
renderFrameBufferMS = new FrameBuffer(width, height, numSamples); |
|
|
|
if (caps.contains(Caps.OpenGL31)) { |
|
|
|
if (caps.contains(Caps.OpenGL32)) { |
|
|
|
Texture2D msColor = new Texture2D(width, height, numSamples, fbFormat); |
|
|
|
Texture2D msColor = new Texture2D(width, height, numSamples, fbFormat); |
|
|
|
Texture2D msDepth = new Texture2D(width, height, numSamples, Format.Depth); |
|
|
|
Texture2D msDepth = new Texture2D(width, height, numSamples, Format.Depth); |
|
|
|
renderFrameBufferMS.setDepthTexture(msDepth); |
|
|
|
renderFrameBufferMS.setDepthTexture(msDepth); |
|
|
@ -456,7 +456,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (numSamples <= 1 || !caps.contains(Caps.OpenGL31)) { |
|
|
|
if (numSamples <= 1 || !caps.contains(Caps.OpenGL32)) { |
|
|
|
renderFrameBuffer = new FrameBuffer(width, height, 1); |
|
|
|
renderFrameBuffer = new FrameBuffer(width, height, 1); |
|
|
|
renderFrameBuffer.setDepthBuffer(Format.Depth); |
|
|
|
renderFrameBuffer.setDepthBuffer(Format.Depth); |
|
|
|
filterTexture = new Texture2D(width, height, fbFormat); |
|
|
|
filterTexture = new Texture2D(width, height, fbFormat); |
|
|
|