Code example for EGL10

Methods: eglDestroyContext

            checkEglError("After eglCreateContext", egl);
            return context;
        public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
            egl.eglDestroyContext(display, context);
    static void checkEglError(String prompt, EGL10 egl) {
        int error;
        while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
            Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
    private static class ConfigChooser implements GLSurfaceView.EGLConfigChooser {
        public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {
Connect your IDE to all the code out there  Get Codota for Java