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 };
Check the spec, page 43:
attrib listmay beNULLor empty (first attribute isEGL_NONE), in which case attributes assume their default values as described below.
EGL_CONTEXT_CLIENT_VERSIONdetermines which version of an OpenGL ES context to create. An attribute value of1specifies creation of an OpenGL ES 1.x context. An attribute value of2specifies creation of an OpenGL ES 2.x context. The default value forEGL_CONTEXT_CLIENT_VERSIONis1.