Code example for EGL10

Methods: eglGetError, eglSwapBuffers

0
    } 
 
    protected void glDraw() { 
        if (hasSurface && !paused) {
            onDrawFrame(gl);
            if (!egl.eglSwapBuffers(display, surface)) {
            } 
            if (egl.eglGetError() == EGL11.EGL_CONTEXT_LOST) {
                paused = true;
            } 
            if (looping) {
                requestDraw(); 
            } 
        } 
    } 
 
    public void surfaceCreated(SurfaceHolder holder) {
    } 
 
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
        this.width = width;