Top Description Fields Constructors Methods
jogamp.opengl

public Class FPSCounterImpl

extends Object
implements FPSCounter
Class Inheritance
All Implemented Interfaces
com.jogamp.opengl.FPSCounter
Imports
java.io.PrintStream, java.util.concurrent.TimeUnit, com.jogamp.opengl.FPSCounter

Default implementation of FPSCounter to be used for FPSCounter implementing renderer.

Field Summary

Modifier and TypeField and Description
private float
private long
private long
private PrintStream
private long
private float
private long
private int
private int

Constructor Summary

AccessConstructor and Description
public
FPSCounterImpl()

Creates a disabled instance

Method Summary

Modifier and TypeMethod and Description
public final synchronized long
getFPSStartTime()

Implements com.jogamp.opengl.FPSCounter.getFPSStartTime.

Returns the time of the first display call in milliseconds after enabling this feature via setUpdateFPSFrames(int, PrintStream).
public final synchronized float
public final synchronized long
public final synchronized long
getLastFPSUpdateTime()

Implements com.jogamp.opengl.FPSCounter.getLastFPSUpdateTime.

Returns the time of the last update interval in milliseconds, if this feature is enabled via setUpdateFPSFrames(int, PrintStream).
public final synchronized float
public final synchronized long
public final synchronized int
public final synchronized int
public final synchronized void
resetFPSCounter()

Implements com.jogamp.opengl.FPSCounter.resetFPSCounter.

Reset all performance counter (startTime, currentTime, frame number)
public final synchronized void
setUpdateFPSFrames(final int
Update interval in frames.
At every rendered frames interval the currentTime and fps values are updated. If the frames interval is <= 0, no update will be issued, ie the FPSCounter feature is turned off. You may choose DEFAULT_FRAMES_PER_INTERVAL.
frames
,
final PrintStream
optional print stream where the fps values gets printed if not null at every frames interval
out
)

Implements com.jogamp.opengl.FPSCounter.setUpdateFPSFrames.

public final synchronized void
tickFPS()

Increases total frame count and updates values if feature is enabled and update interval is reached.

public StringBuilder
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fpsLastback to summary
private float fpsLast
fpsLastPeriodback to summary
private long fpsLastPeriod
fpsLastUpdateTimeback to summary
private long fpsLastUpdateTime
fpsOutputStreamback to summary
private PrintStream fpsOutputStream
fpsStartTimeback to summary
private long fpsStartTime
fpsTotalback to summary
private float fpsTotal
fpsTotalDurationback to summary
private long fpsTotalDuration
fpsTotalFramesback to summary
private int fpsTotalFrames
fpsUpdateFramesIntervalback to summary
private int fpsUpdateFramesInterval

Constructor Detail

FPSCounterImplback to summary
public FPSCounterImpl()

Creates a disabled instance

Method Detail

getFPSStartTimeback to summary
public final synchronized long getFPSStartTime()

Implements com.jogamp.opengl.FPSCounter.getFPSStartTime.

Doc from com.jogamp.opengl.FPSCounter.getFPSStartTime.

Returns the time of the first display call in milliseconds after enabling this feature via setUpdateFPSFrames(int, PrintStream).
This value is reset via resetFPSCounter().

Annotations
@Override
getLastFPSback to summary
public final synchronized float getLastFPS()

Implements com.jogamp.opengl.FPSCounter.getLastFPS.

Returns:float

Doc from com.jogamp.opengl.FPSCounter.getLastFPS.

Last update interval's frames per seconds, getUpdateFPSFrames() / getLastFPSPeriod()

Annotations
@Override
getLastFPSPeriodback to summary
public final synchronized long getLastFPSPeriod()

Implements com.jogamp.opengl.FPSCounter.getLastFPSPeriod.

Returns:long

Doc from com.jogamp.opengl.FPSCounter.getLastFPSPeriod.

Duration of the last update interval in milliseconds.

Annotations
@Override
getLastFPSUpdateTimeback to summary
public final synchronized long getLastFPSUpdateTime()

Implements com.jogamp.opengl.FPSCounter.getLastFPSUpdateTime.

Doc from com.jogamp.opengl.FPSCounter.getLastFPSUpdateTime.

Returns the time of the last update interval in milliseconds, if this feature is enabled via setUpdateFPSFrames(int, PrintStream).
This value is reset via resetFPSCounter().

Annotations
@Override
getTotalFPSback to summary
public final synchronized float getTotalFPS()

Implements com.jogamp.opengl.FPSCounter.getTotalFPS.

Returns:float

Doc from com.jogamp.opengl.FPSCounter.getTotalFPS.

Total frames per seconds, getTotalFPSFrames() / getTotalFPSDuration()

Annotations
@Override
getTotalFPSDurationback to summary
public final synchronized long getTotalFPSDuration()

Implements com.jogamp.opengl.FPSCounter.getTotalFPSDuration.

Returns:long

Doc from com.jogamp.opengl.FPSCounter.getTotalFPSDuration.

Total duration in milliseconds, getLastFPSUpdateTime() - getFPSStartTime()

Annotations
@Override
getTotalFPSFramesback to summary
public final synchronized int getTotalFPSFrames()

Implements com.jogamp.opengl.FPSCounter.getTotalFPSFrames.

Returns:int

Doc from com.jogamp.opengl.FPSCounter.getTotalFPSFrames.

Number of frame rendered since getFPSStartTime() up to getLastFPSUpdateTime()

Annotations
@Override
getUpdateFPSFramesback to summary
public final synchronized int getUpdateFPSFrames()

Implements com.jogamp.opengl.FPSCounter.getUpdateFPSFrames.

Returns:int

Doc from com.jogamp.opengl.FPSCounter.getUpdateFPSFrames.

update interval in frames

Annotations
@Override
resetFPSCounterback to summary
public final synchronized void resetFPSCounter()

Implements com.jogamp.opengl.FPSCounter.resetFPSCounter.

Doc from com.jogamp.opengl.FPSCounter.resetFPSCounter.

Reset all performance counter (startTime, currentTime, frame number)

Annotations
@Override
setUpdateFPSFramesback to summary
public final synchronized void setUpdateFPSFrames(final int frames, final PrintStream out)

Implements com.jogamp.opengl.FPSCounter.setUpdateFPSFrames.

Parameters
frames:int

Doc from com.jogamp.opengl.FPSCounter.setUpdateFPSFrames.

Update interval in frames.
At every rendered frames interval the currentTime and fps values are updated. If the frames interval is <= 0, no update will be issued, ie the FPSCounter feature is turned off. You may choose DEFAULT_FRAMES_PER_INTERVAL.

out:PrintStream

Doc from com.jogamp.opengl.FPSCounter.setUpdateFPSFrames.

optional print stream where the fps values gets printed if not null at every frames interval

Annotations
@Override
tickFPSback to summary
public final synchronized void tickFPS()

Increases total frame count and updates values if feature is enabled and update interval is reached.
Shall be called by actual FPSCounter implementing renderer, after display a new frame.

toStringback to summary
public StringBuilder toString(StringBuilder sb)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override