JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.FPSCounter Interface Reference

FPSCounter feature. More...

Inheritance diagram for com.jogamp.opengl.FPSCounter:
Collaboration diagram for com.jogamp.opengl.FPSCounter:

Public Member Functions

void setUpdateFPSFrames (int frames, PrintStream out)
 
void resetFPSCounter ()
 Reset all performance counter (startTime, currentTime, frame number) More...
 
int getUpdateFPSFrames ()
 
long getFPSStartTime ()
 Returns the time of the first display call in milliseconds after enabling this feature via setUpdateFPSFrames(int, PrintStream). More...
 
long getLastFPSUpdateTime ()
 Returns the time of the last update interval in milliseconds, if this feature is enabled via setUpdateFPSFrames(int, PrintStream). More...
 
long getLastFPSPeriod ()
 
float getLastFPS ()
 
int getTotalFPSFrames ()
 
long getTotalFPSDuration ()
 
float getTotalFPS ()
 

Static Public Attributes

static final int DEFAULT_FRAMES_PER_INTERVAL = 5*60
 

Detailed Description

FPSCounter feature.


An implementation initially has the FPSCounter feature disabled.
Use setUpdateFPSFrames(int, PrintStream) to enable and disable the FPSCounter feature.

Definition at line 37 of file FPSCounter.java.

Member Function Documentation

◆ getFPSStartTime()

long 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().

See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

◆ getLastFPS()

float com.jogamp.opengl.FPSCounter.getLastFPS ( )
Returns
Last update interval's frames per seconds, getUpdateFPSFrames() / getLastFPSPeriod()
See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getLastFPSPeriod()

long com.jogamp.opengl.FPSCounter.getLastFPSPeriod ( )
Returns
Duration of the last update interval in milliseconds.
See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getLastFPSUpdateTime()

long 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().

See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

◆ getTotalFPS()

float com.jogamp.opengl.FPSCounter.getTotalFPS ( )
Returns
Total frames per seconds, getTotalFPSFrames() / getTotalFPSDuration()
See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getTotalFPSDuration()

long com.jogamp.opengl.FPSCounter.getTotalFPSDuration ( )
Returns
Total duration in milliseconds, getLastFPSUpdateTime() - getFPSStartTime()
See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getTotalFPSFrames()

int com.jogamp.opengl.FPSCounter.getTotalFPSFrames ( )
Returns
Number of frame rendered since getFPSStartTime() up to getLastFPSUpdateTime()
See also
setUpdateFPSFrames(int, PrintStream)
resetFPSCounter()

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ getUpdateFPSFrames()

int com.jogamp.opengl.FPSCounter.getUpdateFPSFrames ( )
Returns
update interval in frames
See also
setUpdateFPSFrames(int, PrintStream)

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ resetFPSCounter()

void com.jogamp.opengl.FPSCounter.resetFPSCounter ( )

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

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

◆ setUpdateFPSFrames()

void com.jogamp.opengl.FPSCounter.setUpdateFPSFrames ( int  frames,
PrintStream  out 
)
Parameters
framesUpdate 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.
outoptional print stream where the fps values gets printed if not null at every frames interval

Implemented in com.jogamp.opengl.util.AnimatorBase.

Here is the caller graph for this function:

Member Data Documentation

◆ DEFAULT_FRAMES_PER_INTERVAL

final int com.jogamp.opengl.FPSCounter.DEFAULT_FRAMES_PER_INTERVAL = 5*60
static

Definition at line 38 of file FPSCounter.java.


The documentation for this interface was generated from the following file: