Hi,
I just met a issue of glGenTextures. I wrote the below codes on
Activity.onCreate() function
int[] mTextureNames = new int[1];
GLES20.glGenTextures(1,mTextureNames,0);
SurfaceTexture mSurfaceTexture = new
SurfaceTexture(mTextureNames[0]);
but mTextureNames[0] is
Hello,
Activity.onCreate() runs on application's main thread which is not
associated with a GL context, hence the error message.
The usual way is to have a rendering thread which you can either
associate with a GL context yourself by using EGL calls, or you can
have the Android framework help
2 matches
Mail list logo