Code example for EGL10

Methods: eglCreateWindowSurfaceeglDestroySurfaceeglMakeCurrent

0
            if (mEglSurface != null) {
 
                /* 
                 * Unbind and destroy the old EGL surface, if there is one. 
                 */ 
                mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
                    EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
                mEgl.eglDestroySurface(mEglDisplay, mEglSurface);
            } 
 
            /* 
             * Create an EGL surface we can render into. 
             */ 
            mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay,
                mEglConfig, holder, null);
 
            /* 
             * Before we can issue GL commands, we need to make sure the 
             * context is current and bound to a surface. 
             */ 
            mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
                mEglContext);
 
 
            GL gl = mEglContext.getGL();
            if (mGLWrapper != null) {
Contextual code suggestions in your IDE  Get Codota for Java