Can't call glGenTextures on multithreaded android app

前端 未结 4 469
灰色年华
灰色年华 2021-01-15 14:14

I\'m making an OpenGLES Android app using Android NDK, expanding from android\'s gljni example, which can be found here

It\'s using GLSurfaceView. Textures are initi

4条回答
  •  终归单人心
    2021-01-15 15:02

    I got it working using GLSurfaceView.queueEvent().

    The document says that GLSurfaceView is careful of separating UI thread and rendering thread, and

    queueEvent() makes a code run in its rendering thread.

提交回复
热议问题