I am using a resizeable Canvas and panel for my game so that the window can be resized. This has been working great for a long time. When I set FilterPostProcessor.numSamples to something above 1, to activate anti-ailiasing, it works. The jagged edges are no longer present. However, if I then resize my canvas to a different size, the RootNode turns black! I can still see the GUI, but the draw buffer for the GUI never gets cleared so its draw calls stack on top of the previous ones.
How can I fix this? Can I reload something? I already tried reloading the FilterPostProcessor whenever the window is resized by that didn’t help. Maybe there is a better way to do my Canvas?
@admazzola said:
I did see this post: http://hub.jmonkeyengine.org/forum/topic/canvas-resize-some-update/?topic_page=2&num=15
And that is kinda similar to what I am seeing but the other filter types don’t cause this issue and I am running a late- 2013 build of JME3.
Are you using FXAA?
Are you rebuilding your filter chain, if so?
When I say rebuilding your filter chain… I mean:
When you initialize a Filter, most build a FrameBuffer that is the size of the current canvas. If you alter the Canvas, the Filter is no longer rendering at the proper dimensions.
I am just using fpp.setSamples(4), but maybe FXAA wouldn’t cause the issue. Also I am not manually specifying the framebuffer size, not sure what a Filter Chain even is.