public class TestMultiRenderTarget extends SimpleApplication implements SceneProcessor
The GUI viewport is tiled into 4 pictures, each displaying a different render of 5 colorful cubes in the main scene.
flyCam, fpsText, guiFont, guiNode, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_EXIT, INPUT_MAPPING_HIDE_STATS, INPUT_MAPPING_MEMORY, rootNode, showSettings
assetManager, audioRenderer, cam, context, guiViewPort, inputEnabled, inputManager, joyInput, keyInput, listener, lostFocusBehavior, mouseInput, paused, prof, renderer, renderManager, settings, speed, stateManager, timer, touchInput, viewPort
Constructor and Description |
---|
TestMultiRenderTarget() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildScene()
Add 5 colorful cubes to the main scene.
|
void |
cleanup()
Called when the SP is removed from the RM.
|
void |
destroy()
Do not call manually.
|
void |
initialize(RenderManager rm,
ViewPort vp)
Called in the render thread to initialize the scene processor.
|
boolean |
isInitialized() |
static void |
main(java.lang.String[] args)
The main entry point for the TestMultiRenderTarget application.
|
void |
postFrame(FrameBuffer out)
Called after a frame has been rendered and the queue flushed.
|
void |
postQueue(RenderQueue rq)
Called after the scene graph has been queued, but before it is flushed.
|
void |
preFrame(float tpf)
Called before a frame
|
void |
reshape(ViewPort vp,
int w,
int h)
Called when the resolution of the viewport has been changed.
|
void |
setProfiler(AppProfiler profiler)
Sets a profiler Instance for this processor.
|
void |
simpleInitApp() |
getFlyByCamera, getGuiNode, getRootNode, getSpeed, initialize, isShowSettings, loadGuiFont, setDisplayFps, setDisplayStatView, setShowSettings, setSpeed, simpleRender, simpleUpdate, start, update
createCanvas, destroyInput, enqueue, enqueue, gainFocus, getAppProfiler, getAssetManager, getAudioRenderer, getCamera, getContext, getGuiViewPort, getInputManager, getListener, getLostFocusBehavior, getRenderer, getRenderManager, getStateManager, getTimer, getViewPort, handleError, isPauseOnLostFocus, loseFocus, requestClose, reshape, restart, runQueuedTasks, setAppProfiler, setAssetManager, setLostFocusBehavior, setPauseOnLostFocus, setSettings, setTimer, start, start, start, startCanvas, startCanvas, stop, stop
public static void main(java.lang.String[] args)
args
- unusedprotected void buildScene()
public void simpleInitApp()
simpleInitApp
in class SimpleApplication
public void destroy()
LegacyApplication
destroy
in interface SystemListener
destroy
in class LegacyApplication
public void initialize(RenderManager rm, ViewPort vp)
SceneProcessor
initialize
in interface SceneProcessor
rm
- The render manager to which the SP was added tovp
- The viewport to which the SP is assignedpublic void reshape(ViewPort vp, int w, int h)
SceneProcessor
reshape
in interface SceneProcessor
vp
- the affected ViewPortw
- the new width (in pixels)h
- the new height (in pixels)public boolean isInitialized()
isInitialized
in interface SceneProcessor
public void preFrame(float tpf)
SceneProcessor
preFrame
in interface SceneProcessor
tpf
- Time per framepublic void postQueue(RenderQueue rq)
SceneProcessor
postQueue
in interface SceneProcessor
rq
- The render queuepublic void postFrame(FrameBuffer out)
SceneProcessor
postFrame
in interface SceneProcessor
out
- The FB to which the scene was rendered.public void cleanup()
SceneProcessor
cleanup
in interface SceneProcessor
public void setProfiler(AppProfiler profiler)
SceneProcessor
setProfiler
in interface SceneProcessor
profiler
- the profiler instance.