Thread question about JOGL

The user guide has confused me a bit about JOGL, in particular the part talking about threading issues. It says currently implement on AWT event thread which works well due to input handling happening on AWT thread so there is no threading issues. Then it says they may change which thread OpenGL work is performed on in the future. So…

Do you have to deal with multi-theading when using JOGL? For example, synchronising access to game state due to AWT event thread input handling updating game state.

Yes, you should synchronize game state updates between display() calls or separate game state from render state by pushing render state changes into some queue processed by the display() callback. You can find an example how to do this here: http://www.java-gaming.org/forums/index.php?topic=12475.msg99927#msg99927

Yeah I not actually trying to execute OpenGL calls from the input handling. The input handling just updates where or not keys are currently pressed, then the display method calls logic function which process the input handling.

But since its possible (though this is not currently the case) that display runs on different thread to AWT event thread access to the flags indicating wether a key is pressed may be subject to threading issues. If so then would need to use thread locking around access to the key press flags.

Or is this not the case and you can write applications as if it was single threaded?