Re: Clearing NewtCanvasAWT
Posted by ac on Nov 28, 2012; 2:52pm
URL: https://forum.jogamp.org/Clearing-NewtCanvasAWT-tp4026943p4027268.html
> You think we shall do that ?
Yes, I think the FBO should be cleared, as the framebuffer garbage shows up for a while and doesn't look good, specially when sketches start-up in Processing.
I tried a couple of things to clean it manually... for example calling glClear() the first time the listener's display() method is triggered, but didn't make a difference.
> Maybe in GLFBODrawableImpl, or in FBObject directly ?
I noticed that the garbage appears immediately after frame.add(canvas), which is before any of the drawables or FBObjects are created, if I'm not mistaken. So not sure where the clean-up should happen...
> And then .. in which color ? Default black '0' ?
Black is better than nothing, and is what happens on Windows and Linux anyways. Having the option to set a default color would be great though because then I can make it match the default background color in Processing... but this is not a necessity and adding new API for a single user is probably not a good idea.