Class OGLSystem.RenderingThreadControl
- Enclosing class:
OGLSystem<G extends OGLGraphics>
- Author:
- Matthew Tropiano
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetFPS(int fps) Sets the maximum amount of times per second that the rendering thread will attempt to automatically redraw the contents of the window.voidSets the maximum amount of times per second that the rendering thread will attempt to automatically redraw the contents of the window.
-
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
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.
-