Code example for EGL10

Methods: eglChooseConfigeglCreateContexteglGetDisplayeglInitialize

            mEgl = (EGL10) EGLContext.getEGL();
             * Get to the default display. 
            mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
             * We can now initialize EGL for that display 
            int[] version = new int[2];
            mEgl.eglInitialize(mEglDisplay, version);
            EGLConfig[] configs = new EGLConfig[1];
            int[] num_config = new int[1];
            mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1,
            mEglConfig = configs[0];
             * Create an OpenGL ES context. This must be done only once, an 
             * OpenGL context is a somewhat heavy object. 
            mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig,
                EGL10.EGL_NO_CONTEXT, null);
            mEglSurface = null;
Stop searching for code, let great code find you!  Add Codota to your java IDE