public class MaterialDebugAppState extends AbstractAppState
initialized
Constructor and Description |
---|
MaterialDebugAppState() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(AppStateManager stateManager,
Application app)
Called by
AppStateManager when transitioning this AppState
from initializing to running.This will happen on the next iteration through the update loop after AppStateManager.attach(com.jme3.app.state.AppState) was called. |
void |
registerBinding(java.lang.String shaderName,
Filter filter)
Will reload the filter's materials whenever the shader file is changed
on the hard drive
|
void |
registerBinding(java.lang.String shaderName,
Spatial spat)
Will reload the spatial's materials whenever the shader file is changed
on the hard drive
|
void |
registerBinding(Trigger trigger,
Filter filter)
Will reload the filter's materials whenever the trigger is fired.
|
void |
registerBinding(Trigger trigger,
Spatial spat)
Will reload the spatial's materials whenever the trigger is fired
|
Material |
reloadMaterial(Material mat) |
void |
update(float tpf)
Called to update the
AppState . |
cleanup, getId, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached
public void initialize(AppStateManager stateManager, Application app)
AppState
AppStateManager
when transitioning this AppState
from initializing to running.AppStateManager.attach(com.jme3.app.state.AppState)
was called.
AppStateManager
will call this only from the update loop
inside the rendering thread. This means is it safe to modify the scene
graph from this method.
initialize
in interface AppState
initialize
in class AbstractAppState
stateManager
- The state managerapp
- The applicationpublic void registerBinding(Trigger trigger, Spatial spat)
trigger
- the triggerspat
- the spatial to reloadpublic void registerBinding(Trigger trigger, Filter filter)
trigger
- the triggerfilter
- the filter to reloadpublic void registerBinding(java.lang.String shaderName, Filter filter)
shaderName
- the shader name (relative path to the asset folder or
to a registered asset path)filter
- the filter to reloadpublic void registerBinding(java.lang.String shaderName, Spatial spat)
shaderName
- the shader name (relative path to the asset folder or
to a registered asset path)spat
- the spatial to reloadpublic void update(float tpf)
AppState
AppState
. This method will be called
every render pass if the AppState
is both attached and enabled.update
in interface AppState
update
in class AbstractAppState
tpf
- Time since the last call to update(), in seconds.