我正在查看 android ndk opengl es 示例。不管怎样,它里面有几行:
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
其中 EGL_CONTEXT_CLIENT_VERSION 定义为:
private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
我一直在检查 该调用的 API,它表示最后一个参数用于属性列表。但我似乎找不到任何实际提供您可能想要放入其中的属性的内容,甚至无法解释该示例放入其中的两个属性。谁能告诉我这些属性是什么意思? (或者更好的是,还向我指出一些解释它的文档)。
谢谢
编辑:我刚刚意识到一些背景知识会有所帮助。特定示例位于samples/hello-gl2 中。该文件位于视图类中,特别是 ContextFactory 静态类中。
I'm looking at the android ndk opengl es example. Anyway, it has the lines in there:
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
Where EGL_CONTEXT_CLIENT_VERSION is defined as:
private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
I've been going over the API for that call, and it says that the last parameter is for the attributes list. But I can't seem to find anything that actually gives attributes you might want to put in there, or even explain the two attributes that the example puts in there. Can anyone tell me what these attributes mean? (Or better yet, also point me to some documentation that explains it).
Thank you
Edit: I just realised that a bit of context would help. The particular sample is in samples/hello-gl2. The file is in the view class, in particular, the ContextFactory static class.
发布评论
评论(1)
检查规范,第 43 页:
Check the spec, page 43: