Attribute list in eglCreateContext

后端 未结 1 875
春和景丽
春和景丽 2020-12-19 04:50

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 };         


        
相关标签:
1条回答
  • 2020-12-19 05:27

    Check the spec, page 43:

    attrib list may be NULL or empty (first attribute is EGL_NONE), in which case attributes assume their default values as described below.

    EGL_CONTEXT_CLIENT_VERSION determines which version of an OpenGL ES context to create. An attribute value of 1 specifies creation of an OpenGL ES 1.x context. An attribute value of 2 specifies creation of an OpenGL ES 2.x context. The default value for EGL_CONTEXT_CLIENT_VERSION is 1.

    0 讨论(0)
提交回复
热议问题