cocos2d/cocos2d-x — pull request #3767 by michaelcontento (2013-09-23 10:02:33+00:00)
Title: re-introduce Cocos2dxHelper.runOnGLThread(Runnable)

It's crucial to execute various tasks synchonized with the rendering loop /
thread, but this ability (runOnGLThread) got removed with the NativeActivity
transitions a few days ago. This patch adds this method back again.

#Why can't we just use runOnUiThread()? Because it seems not to be synchronized
properly and can cause broken OpenGL textures or even the whole app to crash.

Isn't there a better way to get into the mainloop? I hope so! But I'm not a
experienced Android developer and this solution is quite simple / the only one
that worked without any problems.