Can't call glGenTextures on multithreaded android app

前端 未结 4 506
灰色年华
灰色年华 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 14:51

    It's not random behaviour, that's how OpenGL interacts with threads. A context is only current on only ONE thread, other threads don't have a GL context unless you specifically create a context for each thread you want to use with OpenGL. Without a context, all GL calls fail.

提交回复
热议问题