Code example for EGL10

Methods: eglCreateContext

	private static String TAG = "GL2JNIView";
	private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
	public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
		Log.w(TAG, "creating OpenGL ES 2.0 context");
		GL2JNIView.checkEglError("Before eglCreateContext", egl);
		int[] attrib_list = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
		EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
		GL2JNIView.checkEglError("After eglCreateContext", egl);
		return context;
	public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
		egl.eglDestroyContext(display, context);
Connect your IDE to all the code out there  Get Codota for Java