|
|
|
@ -37,6 +37,7 @@ import com.jme3.math.ColorRGBA; |
|
|
|
|
import com.jme3.math.Vector3f; |
|
|
|
|
import com.jme3.post.SceneProcessor; |
|
|
|
|
import com.jme3.renderer.Camera; |
|
|
|
|
import com.jme3.renderer.Caps; |
|
|
|
|
import com.jme3.renderer.RenderManager; |
|
|
|
|
import com.jme3.renderer.ViewPort; |
|
|
|
|
import com.jme3.renderer.queue.RenderQueue; |
|
|
|
@ -49,6 +50,8 @@ import java.awt.image.DataBufferByte; |
|
|
|
|
import java.awt.image.WritableRaster; |
|
|
|
|
import java.nio.ByteBuffer; |
|
|
|
|
import java.util.concurrent.ConcurrentLinkedQueue; |
|
|
|
|
import java.util.logging.Level; |
|
|
|
|
import java.util.logging.Logger; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
@ -115,6 +118,7 @@ public class ScenePreviewProcessor implements SceneProcessor { |
|
|
|
|
//setup framebuffer to use texture
|
|
|
|
|
offBuffer.setDepthBuffer(Format.Depth); |
|
|
|
|
offBuffer.setColorBuffer(Format.RGBA8); |
|
|
|
|
offBuffer.setSrgb(true); |
|
|
|
|
|
|
|
|
|
//set viewport to render to offscreen framebuffer
|
|
|
|
|
offView.setOutputFrameBuffer(offBuffer); |
|
|
|
|