Package org.geoforge.plg3danimatedshapes.media.opengl.util

Examples of org.geoforge.plg3danimatedshapes.media.opengl.util.GfrFPSAnimatorPlgViewerVolShps3dAni


         public void run() {
            // Create the OpenGL rendering canvas
            GLCanvas canvas = new GfrGLCanvasPlgViewerVolShps3dAni();
            // Create a animator that drives canvas' display() at the specified FPS.
            final FPSAnimator animator = new GfrFPSAnimatorPlgViewerVolShps3dAni(canvas);
            // Create the top-level container
            ifr.getContentPane().add(canvas);
           
            ifr.addInternalFrameListener(new InternalFrameAdapter()
            {
               @Override
               public void internalFrameClosing(InternalFrameEvent e)
               {
                  // Use a dedicate thread to run the stop() to ensure that the
                  // animator stops before program exits.
                  new Thread()
                  {
                     @Override
                     public void run()
                     {
                         try
                         {
                            if (animator.isStarted()) animator.stop();
                         }
                        
                         catch(Exception exc) // ie. java.lang.Exception: Stack trace,
                         {
                             // don't care
                         }
                       
                     }
                  }.start();
               }
            });
           
            animator.start(); // start the animation loop
         }
      });
     
     
     
View Full Code Here

TOP

Related Classes of org.geoforge.plg3danimatedshapes.media.opengl.util.GfrFPSAnimatorPlgViewerVolShps3dAni

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.