我的android支持
EGL_KHR_no_config_context
但是运行这个会抛出异常
EGLDisplay display = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
int[] version = new int[2];
EGL14.eglInitialize(display, version,0, version,0);
int[] attrib_list = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 3, EGL14.EGL_NONE };
EGL14.eglCreateContext(display, null, EGL14.EGL_NO_CONTEXT, attrib_list,0);
注意
null
而不是 config
JNI DETECTED ERROR IN APPLICATION: JNI CallLongMethodV called with pending exception java.lang.IllegalArgumentException: Object is set to null.
at android.opengl.EGLContext android.opengl.EGL14.eglCreateContext(android.opengl.EGLDisplay, android.opengl.EGLConfig, android.opengl.EGLContext, int[], int) (EGL14.java:-2)
正确的使用方法是什么
EGL_KHR_no_config_context
JNI 绑定不支持无配置上下文创建。仅当您直接从本机代码调用 EGL 时才支持此扩展。