No you cannot do this. Invoking OpenGL ES functions out of UI thread will make the GL state machine confusion.
On iOS there's an API to switch GL state machine to another thread (but sorry I've forgotten the name of this API); while on android there's nothing to do, you must always call OpenGL ES functions in UI thread. ------by walzer wang
cocos2d-x 在新thread中调用opengles绘制函数会出错
最新推荐文章于 2020-10-30 10:20:35 发布
本文解释了在不同平台上调用OpenGL ES函数时的线程安全问题。指出在Android上必须在UI线程中调用OpenGL ES函数以避免状态机混乱,并提到了iOS平台上有专门的API可以切换OpenGL状态机到另一个线程。
568

被折叠的 条评论
为什么被折叠?



