The EGLSurface can be an off-screen buffer allocated by EGL, called a pbuffer, or a window allocated by the operating system. Calling the eglCreateWindowSurface() function creates EGL window surfaces. eglCreateWindowSurface() takes a window object as an argument, which on Android is a surface.
What is EGL Linux?
EGL is an interface between Khronos rendering APIs such as OpenGL ES and the underlying native platform window system. It handles graphics context management, surface/buffer binding, and rendering synchronization and enables high-performance, accelerated, mixed-mode, 2D and 3D rendering using other Khronos APIs.
What is an EGL context?
An EGL rendering context is required to bind client API rendering to an EGL surface. An EGL surface and an EGL rendering context must have compatible EGL frame buffer configurations. An EGL rendering context may be bound to one or two EGL surfaces by calling eglMakeCurrent.
What is ANativeWindow?
ANativeWindow is opaque type that provides access to a native window. ANativeWindow is a struct that represents a windows buffer. A pointer can be obtained using ANativeWindow_lock().
What is libEGL?
The main library ( libEGL ) is window system neutral. It provides the EGL API entry points and helper functions for use by the drivers. Drivers are dynamically loaded by the main library and most of the EGL API calls are directly dispatched to the drivers.
What is EGL config?
eglGetConfigs returns a list of all EGL frame buffer configurations that are available for the specified display. This is useful for querying just the number of all frame buffer configurations.
What is the eglswapbuffers command?
That is when the eglSwapBuffers command is called. Because this command is directly executed by the driver, there’s a chance so that the GPU will draw pending glDraw* commands onto an unexpected surface buffer, since the front-buffer and back-buffer were swapped before.
Are OpenGL ES buffer mappings affected by eglmakecurrent?
OpenGL and OpenGL ES buffer mappings created by e.g. glMapBuffer are not affected by eglMakeCurrent; they persist whether the context owning the buffer is current or not.
What is the use of edeglmakecurrent?
eglMakeCurrent binds context to the current rendering thread and to the draw and read surfaces. For an OpenGL or OpenGL ES context, draw is used for all operations except for any pixel data read back or copied (glReadPixels, glCopyTexImage2D, and glCopyTexSubImage2D), which is taken from the frame buffer values of read.
What happens if read is destroyed after eglmakecurrent?
If read is destroyed after eglMakeCurrent then pixel values read from the framebuffer (e.g., as result of calling glReadPixels) are undefined. If a native window or pixmap underlying the draw or read surfaces is destroyed, rendering and read back are handled as above.