public class BasicProfilerState extends BaseAppState
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INPUT_MAPPING_PROFILER_TOGGLE |
Constructor and Description |
---|
BasicProfilerState() |
BasicProfilerState(boolean enabled) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(Application app)
Called after the app state is detached or during
application shutdown if the state is still attached.
|
int |
getFrameCount() |
float |
getGraphScale() |
BasicProfiler |
getProfiler() |
protected void |
initialize(Application app)
Called during initialization once the app state is
attached and before onEnable() is called.
|
protected void |
onDisable()
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 |
refreshBackground() |
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 |
toggleProfiler() |
cleanup, getApplication, getId, getState, getState, getStateManager, initialize, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached, update
public static final java.lang.String INPUT_MAPPING_PROFILER_TOGGLE
public BasicProfilerState()
public BasicProfilerState(boolean enabled)
public void toggleProfiler()
public BasicProfiler getProfiler()
public void setGraphScale(float scale)
scale
- the scalepublic float getGraphScale()
public void setFrameCount(int count)
count
- the number of framespublic int getFrameCount()
protected void refreshBackground()
protected void initialize(Application app)
BaseAppState
initialize
in class BaseAppState
app
- the applicationprotected void cleanup(Application app)
BaseAppState
cleanup
in class BaseAppState
app
- the applicationprotected void onEnable()
BaseAppState
onEnable
in class BaseAppState
protected void onDisable()
BaseAppState
onDisable
in class BaseAppState