NullPointerException on lockMeshes

NPE usually means that you are accessing the SceneGraph from a thread that is not the OpenGL thread. Are you using multiple threads in the application? Are you using StandardGame?

Yeah I'm using StandardGame. I have my main Game class (not inheriting from anything) and I instantiate a StandardGame object in it. I then create a DebugGameState object, which is where all of my code is. Is this the right approach?

thou shall not call GL11 Methods in foreign threads.


GameTaskQueueManager.getManager().render(new Callable<Object>() {
    public Object call() throws Exception {
      spatial.lock()
      return null;
    }
  }).get();



Your posted code is from your GameStates constructor right?
Only the GameStates update() and render() methods are executed in the OpenGl thread automatically.
For everything else you need to GameTaskQueue to inject things into the OpenGl Thread.

EXACTLY what I needed to know. Thanks a ton, it works now. Man, it sure was lagging a ton without the use of display lists…