Code example for GLSurfaceView.EGLConfigChooser

Methods: chooseConfig

0
			/* 
			 * We can now initialize EGL for that display 
			 */ 
			int[] version = new int[2];
			mEgl.eglInitialize(mEglDisplay, version);
			mEglConfig = mEGLConfigChooser.chooseConfig(mEgl, mEglDisplay);
 
			/* 
			 * Create an OpenGL ES context. This must be done only once, an OpenGL context is a somewhat heavy object. 
			 */ 
			mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null);
 
			mEglSurface = null;
		} 
 
		/* 
		 * React to the creation of a new surface by creating and returning an OpenGL interface that renders to that surface. 
		 */ 
		public GL createSurface (SurfaceHolder holder) {
			/* 
			 * The window size has changed, so we need to create a new surface.