Clearing NewtCanvasAWT
Posted by
ac on
Nov 14, 2012; 3:22pm
URL: https://forum.jogamp.org/Clearing-NewtCanvasAWT-tp4026943.html
I'm experiencing a minor issue. When I initialize my drawing surface using NewtCanvasAWT, the window momentarily shows garbage from the framebuffer, something like this:
http://snag.gy/v8JZZ.jpgThis happens when I add the NewtCanvasAWT to the parent component (in my case an Applet), and will show up until the animator loop kicks in and glClear() is called for the first time.
Even if I call canvas.setBackground(Color.GRAY) before adding the NEWT canvas to the parent, I still see the garbage. If the application does some time-consuming initialization before clearing the first frame, the garbage frame could be seen for a relatively long time. Is there any way to make sure that the NewtCanvasAWT is clean before attaching it to the parent? This didn't happen with AWT's GLCanvas, BTW.