Code example for EGLContext

Methods: getGL

0
            mEglSurface = mEgl.eglCreateWindowSurface( 
                    mEglDisplay, mEglConfig, mMosaicOutputSurfaceTexture, null); 
            if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) { 
                throw new RuntimeException("failed to createWindowSurface"); 
            } 
 
            if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) { 
                throw new RuntimeException("failed to eglMakeCurrent"); 
            } 
 
            mGl = (GL10) mEglContext.getGL(); 
 
            mInputSurfaceTexture = new SurfaceTexture(MosaicRenderer.init()); 
            MosaicRenderer.reset(mWidth, mHeight, mIsLandscape); 
        } 
 
        private void doRelease() { 
            mEgl.eglDestroySurface(mEglDisplay, mEglSurface); 
            mEgl.eglDestroyContext(mEglDisplay, mEglContext); 
            mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, 
                    EGL10.EGL_NO_CONTEXT);