Hi,
is there any difference between:
GameTaskQueueManager.getManager().update(new Callable<Object>() {
public Object call() throws Exception {
return null;
}
});
and
GameTaskQueueManager.getManager().getQueue(GameTaskQueue.UPDATE).enqueue(
new Callable<Object>(){
public Object call() throws Exception
{
return null;
}
});
Which other code snippsets are important to know in the context of OpenGL threads?
The update and render methods of the GameStates are already called within the OpenGL Thread.
I also know the blocking code (but only for updates!?):
Future<Object> f = GameTaskQueueManager.getManager().update(new Callable<Object>() {
public Object call() throws Exception {
return null;
}
});
f.get();
I would like to create a new CameraNode during the initialization of my GameState, but therefore I must wait until the DisplaySystem is available, otherwise (still a problem) I'm getting G11.. NullPointer Exception.. whatever ;)
By the way, is there a possibility to use the Future class for this purpose? Moreover I've no clue ATM how the DisplaySystem is created in the StandardGame.. when is the System available to create a second camera with
DisplaySystem.getDisplaySystem().getRenderer().createCamera(DisplaySystem.getDisplaySystem().getWidth(), DisplaySystem.getDisplaySystem().getHeight());