|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface for a threaded renderer (animator thread).
If an animation class, e.g. GLAnimCanvas
,
implements GLDrawable
and this interface,
you will benefit from the new context handling GLContext.gljFree()
.
GLContext
,
GLDrawable
,
GLAnimCanvas
Method Summary | |
void |
freeGLContext()
Forces this thread to release it's GLContext ! To ensure this, this thread enables itself, and calls gljFree(true) to force the release ! |
boolean |
isAlive()
is the thread alive, means is started and not died ? |
boolean |
isSuspended()
is the thread suspended, means is started but waiting, or not alive (ok :-| - but it is practical) |
boolean |
ownsThread(java.lang.Thread thread)
Identifies this object with the given thread .. |
void |
ReInit()
ReInit should be overwritten by you, to enter your re-initialisation within setSuspended(false) |
void |
run()
The running loop for animations which initiates the call of display Be sure to force freeing the GL context with GLContext.gljFree() (true), if:
|
void |
setSuspended(boolean suspend)
Here we can (re)start or suspend animation ... |
void |
setSuspended(boolean suspend,
boolean reInit)
Here we can (re)start or suspend animation ... |
void |
start()
This creates and start one singleton unique thread ! |
void |
stop()
This stops and destroys (deferred) our singleton unique thread ! |
Method Detail |
public void start()
public void stop()
public boolean ownsThread(java.lang.Thread thread)
public void run()
GLContext.gljFree()
(true), if:
- you exit this run loop - you suspend your thread -> wait - you kill your thread ..Also be sure, to implement this Runnable as Java2 does recomends ! Look at the example implementation
GLAnimCanvas.run()
!run
in interface java.lang.Runnable
GLAnimCanvas.run()
,
setSuspended(boolean)
public void setSuspended(boolean suspend)
suspend
- if true the thread will be suspended,
if false, the thread will be (re)startedisAlive()
,
start()
public void setSuspended(boolean suspend, boolean reInit)
suspend
- if true the thread will be suspended,
if false, the thread will be (re)startedreInit
- if true the ReInit will be called additionally,
where the user can set additional initialisationsReInit()
,
isAlive()
,
start()
,
run()
public boolean isAlive()
run()
,
setSuspended(boolean)
,
start()
,
stop()
public boolean isSuspended()
run()
,
setSuspended(boolean)
,
start()
,
stop()
public void ReInit()
setSuspended(boolean)
public void freeGLContext()
setSuspended(boolean)
,
run()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |