Hi all,
I am a bit confused about how to render directly to the screen and what roll it plays in viewports.
So far, I render a bunch of things to framebuffers by creating a new framebuffer and setting that to a viewport. For instance:
Code:
filterViewPort = renderManager.createMainView("filterViewPort", cam);
filterViewPort.setOutputFrameBuffer(someBufferICreated);
Now, I want to draw one of these textures on the screen but I don't want to use the default viewport in SimpleApplication (so far that's the only way I know how to draw to the screen). I thought maybe I could just write to the same buffer as the default viewport, but viewport.getOutputFrameBuffer() is null?
Code:
filterViewPort.setOutputFrameBuffer(viewport.getOutputFrameBuffer()); // viewport.getOutputFrameBuffer() is null
This causes null pointer problems.
So, is there a default special framebuffer that results in output going directly to the screen? I do not need to read from this framebuffer at all.
If that's not the case, how does it work?
And is there a way for me to tell something to draw directly to the screen?