Package com.jogamp.opengl
Interface FPSCounter
-
- All Known Subinterfaces:
GLAnimatorControl
- All Known Implementing Classes:
Animator
,AnimatorBase
,FPSAnimator
,jogamp.opengl.GLAutoDrawableBase
,GLAutoDrawableDelegate
public interface FPSCounter
FPSCounter feature.
An implementation initially has the FPSCounter feature disabled.
UsesetUpdateFPSFrames(int, PrintStream)
to enable and disable the FPSCounter feature.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_FRAMES_PER_INTERVAL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getFPSStartTime()
Returns the time of the first display call in milliseconds after enabling this feature viasetUpdateFPSFrames(int, PrintStream)
.
This value is reset viaresetFPSCounter()
.float
getLastFPS()
long
getLastFPSPeriod()
long
getLastFPSUpdateTime()
Returns the time of the last update interval in milliseconds, if this feature is enabled viasetUpdateFPSFrames(int, PrintStream)
.
This value is reset viaresetFPSCounter()
.float
getTotalFPS()
long
getTotalFPSDuration()
int
getTotalFPSFrames()
int
getUpdateFPSFrames()
void
resetFPSCounter()
Reset all performance counter (startTime, currentTime, frame number)void
setUpdateFPSFrames(int frames, PrintStream out)
-
-
-
Field Detail
-
DEFAULT_FRAMES_PER_INTERVAL
static final int DEFAULT_FRAMES_PER_INTERVAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUpdateFPSFrames
void setUpdateFPSFrames(int frames, PrintStream out)
- Parameters:
frames
- 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 chooseDEFAULT_FRAMES_PER_INTERVAL
.out
- optional print stream where the fps values gets printed if not null at every frames interval
-
resetFPSCounter
void resetFPSCounter()
Reset all performance counter (startTime, currentTime, frame number)
-
getUpdateFPSFrames
int getUpdateFPSFrames()
- Returns:
- update interval in frames
- See Also:
setUpdateFPSFrames(int, PrintStream)
-
getFPSStartTime
long getFPSStartTime()
Returns the time of the first display call in milliseconds after enabling this feature viasetUpdateFPSFrames(int, PrintStream)
.
This value is reset viaresetFPSCounter()
.
-
getLastFPSUpdateTime
long getLastFPSUpdateTime()
Returns the time of the last update interval in milliseconds, if this feature is enabled viasetUpdateFPSFrames(int, PrintStream)
.
This value is reset viaresetFPSCounter()
.
-
getLastFPSPeriod
long getLastFPSPeriod()
- Returns:
- Duration of the last update interval in milliseconds.
- See Also:
setUpdateFPSFrames(int, PrintStream)
,resetFPSCounter()
-
getLastFPS
float getLastFPS()
- Returns:
- Last update interval's frames per seconds,
getUpdateFPSFrames()
/getLastFPSPeriod()
- See Also:
setUpdateFPSFrames(int, PrintStream)
,resetFPSCounter()
-
getTotalFPSFrames
int getTotalFPSFrames()
- Returns:
- Number of frame rendered since
getFPSStartTime()
up togetLastFPSUpdateTime()
- See Also:
setUpdateFPSFrames(int, PrintStream)
,resetFPSCounter()
-
getTotalFPSDuration
long getTotalFPSDuration()
- Returns:
- Total duration in milliseconds,
getLastFPSUpdateTime()
-getFPSStartTime()
- See Also:
setUpdateFPSFrames(int, PrintStream)
,resetFPSCounter()
-
getTotalFPS
float getTotalFPS()
- Returns:
- Total frames per seconds,
getTotalFPSFrames()
/getTotalFPSDuration()
- See Also:
setUpdateFPSFrames(int, PrintStream)
,resetFPSCounter()
-
-