Package com.jogamp.opengl.util

Examples of com.jogamp.opengl.util.FPSAnimator


    setSize(800, 600);
    setIgnoreRepaint(true);

    addGLEventListener(new ViewerGLEventListener(data, messageManager, renderOptions));

    FPSAnimator animator = new FPSAnimator( this, 60 );
       
    animator.start();

  }
View Full Code Here


         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

    this.addKeyListener(new Clavier(glListener));
    this.addMouseListener(new Souris(glListener));

    this.addGLEventListener(glListener);

    animator = new FPSAnimator(this, 60);
  }
View Full Code Here

   
    this.addKeyListener(new Clavier(glListener));

    this.addGLEventListener(glListener);

    animator = new FPSAnimator(this, 60);
   
    animator.start();
  }
View Full Code Here

    GLCapabilitiesImmutable capabilities = new GLCapabilities(profile);
    canvas = new GLCanvas(capabilities);
    canvas.addGLEventListener(this);
    frame.add(canvas, BorderLayout.CENTER);
   
    animator = new FPSAnimator(canvas, UI.FPS, true);
  }
View Full Code Here

            glCanvas.addMouseWheelListener(listener);

            drawable = glCanvas;
        }

        animator = new FPSAnimator(drawable, 30);

        if (TOOLKIT == Toolkit.NEWT) {
            final GLWindow window = (GLWindow) drawable;

            window.addWindowListener(new com.jogamp.newt.event.WindowAdapter() {
View Full Code Here

  }

  public void start(TickHandler tickHandler) {
    this.tickHandler = tickHandler;
    this.animator = new FPSAnimator(this.window.getCanvas(), 60);
    this.animator.start();
  }
View Full Code Here

                window.destroy();
                System.exit(0);
            }
        });

        animator = new FPSAnimator(window, settings.getFps());
        animator.add(window);
    }
View Full Code Here

        this.canvas = new VisualizerCanvas();
        canvas.setPreferredSize(new Dimension(ws.width, ws.height));
        canvas.setLocation(ws.xLocation, ws.yLocation);

        // Create a animator that drives canvas' display() at the specified FPS.
        this.animator = new FPSAnimator(canvas, FPS, true);

        // Create the top-level container
        final JFrame frame = this; // Swing's JFrame or AWT's Frame
        frame.getContentPane().add(canvas);
       
View Full Code Here

    // auto swap buffer mode is true by default, but we are explicit here
    this.canvas.setAutoSwapBufferMode(true);
    this.getContentPane().add(this.canvas);

    // drive the display loop at 60 frames per second
    this.animator = new FPSAnimator(this.canvas, 60);

    this.setTitle("CS480/CS680 Skeleton Polygon Tool");
    this.setSize(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setVisible(true);
View Full Code Here

TOP

Related Classes of com.jogamp.opengl.util.FPSAnimator

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.