org.xith3d.loop
Interface RenderLoopController

All Known Implementing Classes:
InputAdapterRenderLoop, RenderLoop

public interface RenderLoopController

This is used to control a RenderLoop from outside.


Method Summary
 long nextFrame()
          If the RenderLoop is currently running in RUN_IN_SEPARATE_THREAD_AND_WAIT RunMode the next iteration is allowed and executed asynchronously. -1 is returned as the frame time, because it is not defined at this time.
 

Method Detail

nextFrame

long nextFrame()
If the RenderLoop is currently running in RUN_IN_SEPARATE_THREAD_AND_WAIT RunMode the next iteration is allowed and executed asynchronously. -1 is returned as the frame time, because it is not defined at this time.
If the RenderLoop is not running, the next iteration is executed in the calling Thread and the needed (brutto) time for this frame is returned.

In all other cases an IllegalStateException is thrown.

Returns:
the time needed for this frame
Throws:
java.lang.IllegalStateException - if the RenderLoop is running and the RunMode is not RUN_IN_SEPARATE_THREAD_AND_WAIT