Code example for EGL10

Methods: eglGetCurrentContext, eglGetError

0
            throw new RuntimeException(function + " failed: " + mEgl.eglGetError());
        } 
         
        /** Checks to see if the current context is valid.  **/ 
        public boolean verifyContext() { 
                EGLContext currentContext = mEgl.eglGetCurrentContext();
                        return currentContext != EGL10.EGL_NO_CONTEXT && mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
                } 
 
        EGL10 mEgl;
        EGLDisplay mEglDisplay;
        EGLSurface mEglSurface;
        EGLConfig mEglConfig;
        EGLContext mEglContext;
                 
    } 
 
    /** 
     * A generic GL Thread. Takes care of initializing EGL and GL. Delegates 
     * to a Renderer instance to do the actual drawing. Can be configured to 
     * render continuously or on request.