Package com.jme3.app
Class BasicProfilerState
java.lang.Object
com.jme3.app.state.BaseAppState
com.jme3.app.BasicProfilerState
- All Implemented Interfaces:
AppState
Provides a basic profiling visualization that shows
per-frame application-wide timings for update and
rendering.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanup
(Application app) Called after the app state is detached or during application shutdown if the state is still attached.int
float
protected void
initialize
(Application app) Called during initialization once the app state is attached and before onEnable() is called.protected void
Called when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.protected void
onEnable()
Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.protected void
void
setFrameCount
(int count) Sets the number frames displayed and tracked.void
setGraphScale
(float scale) Sets the vertical scale of the visualization where each unit is a millisecond.void
Methods inherited from class com.jme3.app.state.BaseAppState
cleanup, getApplication, getId, getState, getState, getState, getState, getStateManager, initialize, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached, update
-
Field Details
-
INPUT_MAPPING_PROFILER_TOGGLE
- See Also:
-
-
Constructor Details
-
BasicProfilerState
public BasicProfilerState() -
BasicProfilerState
public BasicProfilerState(boolean enabled)
-
-
Method Details
-
toggleProfiler
public void toggleProfiler() -
getProfiler
-
setGraphScale
public void setGraphScale(float scale) Sets the vertical scale of the visualization where each unit is a millisecond. Defaults to 2, ie: a single millisecond stretches two pixels high.- Parameters:
scale
- the scale
-
getGraphScale
public float getGraphScale() -
setFrameCount
public void setFrameCount(int count) Sets the number frames displayed and tracked.- Parameters:
count
- the number of frames
-
getFrameCount
public int getFrameCount() -
refreshBackground
protected void refreshBackground() -
initialize
Description copied from class:BaseAppState
Called during initialization once the app state is attached and before onEnable() is called.- Specified by:
initialize
in classBaseAppState
- Parameters:
app
- the application
-
cleanup
Description copied from class:BaseAppState
Called after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.- Specified by:
cleanup
in classBaseAppState
- Parameters:
app
- the application
-
onEnable
protected void onEnable()Description copied from class:BaseAppState
Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.- Specified by:
onEnable
in classBaseAppState
-
onDisable
protected void onDisable()Description copied from class:BaseAppState
Called when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.- Specified by:
onDisable
in classBaseAppState
-