Example #1
0
  /**
   * Main drawing function. Inside this function the main part of the drawing is done.
   *
   * @param drawable the drawable object that is used to trigger the drawing actions
   */
  @Override
  public void display(final GLAutoDrawable drawable) {
    final GL gl = drawable.getGL();
    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

    manager.draw();
  }
Example #2
0
 /**
  * Set the frames per second the display should be shown with.
  *
  * @param fps the target frames per second
  */
 @Override
 public void setFPS(final int fps) {
   manager.renderStarted();
   if (animator != null) {
     animator.stop();
     animator.remove(this);
     animator = null;
   }
   if (fps > -1) {
     setIgnoreRepaint(true);
     // animator = new Animator(this);
     animator = new FPSAnimator(this, fps, true);
     animator.start();
   } else {
     setIgnoreRepaint(false);
   }
 }
Example #3
0
 @Override
 public void renderTask(final RenderTask task) {
   manager.addTask(task);
 }