Code example for EGL10

Methods: eglCreateContext

0
	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);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE