Class OGLSystem.RenderingThreadControl

java.lang.Object
com.blackrook.gloop.opengl.OGLSystem.RenderingThreadControl
Enclosing class:
OGLSystem<G extends OGLGraphics>

public class OGLSystem.RenderingThreadControl extends Object
A control class for the rendering thread, now locked to a window.
Author:
Matthew Tropiano
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setFPS(int fps)
    Sets the maximum amount of times per second that the rendering thread will attempt to automatically redraw the contents of the window.
    void
    setFPS(Long fps)
    Sets the maximum amount of times per second that the rendering thread will attempt to automatically redraw the contents of the window.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RenderingThreadControl

      public RenderingThreadControl()
  • Method Details

    • setFPS

      public void setFPS(int fps)
      Sets the maximum amount of times per second that the rendering thread will attempt to automatically redraw the contents of the window. Depending on the heft of what is being drawn, this maximum may not be reached.

      If set to null, no redraws occur unless triggered by the application or the windowing system.

      If set to a number that is 0 or less, this will keep redrawing continuously. If greater than 0, it will trigger redraws that many times per second. Events that want to redraw the window passively are ignored in both circumstances.

      By default, this is set to null.

      NOTE: If an exception occurs during the rendering thread's execution, continual redraw is halted via setFPS(null) until it is started again.

      Parameters:
      fps - the new FPS value. Can be null.
    • setFPS

      public void setFPS(Long fps)
      Sets the maximum amount of times per second that the rendering thread will attempt to automatically redraw the contents of the window. Depending on the heft of what is being drawn, this maximum may not be reached.

      If set to null, no redraws occur unless triggered by the application or the windowing system.

      If set to a number that is 0 or less, this will keep redrawing continuously. If greater than 0, it will trigger redraws that many times per second. Events that want to redraw the window passively are ignored in both circumstances.

      By default, this is set to null.

      NOTE: If an exception occurs during the rendering thread's execution, continual redraw is halted via setFPS(null) until it is started again.

      Parameters:
      fps - the new FPS value. Can be null.