Code example for EGL10

Methods: eglDestroyContext, eglDestroySurface, eglMakeCurrent, eglTerminate

0
				mainLoop.join();
			} 
			catch (Exception ex) {}
			mainLoop = null;
			 
	        egl.eglMakeCurrent(dpy, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
	        egl.eglDestroySurface(dpy, surface);
	        egl.eglDestroyContext(dpy, eglContext);
	        egl.eglTerminate(dpy);
		} 
	}	 
	 
	/** 
	 * Some initialization of the OpenGL stuff (that I don't 
	 * understand...) 
	 */ 
	protected void init() {		 
		// Much of this code is from GLSurfaceView in the Google API Demos. 
		// I encourage those interested to look there for documentation. 
		egl = (EGL10)EGLContext.getEGL();
		dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);