Is there an elegant way of executing (injecting it in the GL thread) some code at every update cycle? I want to do this without actually having to insert it every time I want to execute it, and also to avoid a potential delay between rendering/updating.
Yes there is duenez, but you have to use gamestates and attach them to the singleton of com.jmex.game.state.GameStateManager.
Remember to activate them.
Oh, now I see… GameStates have an update method that will be called at each iteration XD I feel so dumb now!