Login  Register

Re: The screen turns blank when I resize the window

Posted by Rii933 on Mar 04, 2016; 12:10pm
URL: https://forum.jogamp.org/The-screen-turns-blank-when-I-resize-the-window-tp4036401p4036433.html

yes , I tried that too (I forgot to mention it)

I added : System.setProperty("sun.awt.noerasebackground", "true");  in the first line of my main.
and this:  c.getView().setMinimumFrameCycleTime(50);  after creating the canvas and adding it to a universe

I tried to add a non passive behaviour too (like Phil said)
           
 
       private static class GoBehavior extends Behavior
       {
               private WakeupCondition FPSCriterion = new WakeupOnElapsedFrames(0, false);

               public GoBehavior()
               {
                       setSchedulingBounds(new BoundingSphere(new Point3d(0.0, 0.0, 0.0), Double.POSITIVE_INFINITY));
                       setEnable(true);
               }

               public void initialize()
               {
                       wakeupOn(FPSCriterion);
               }

               @SuppressWarnings("rawtypes")
               public void processStimulus(Enumeration criteria)
               {

                       wakeupOn(FPSCriterion);
               }
       }

GoBehavior go = new GoBehavior();

then added it to my nodeRoot:    nodeRoot.addChild(go);