androidx.graphics.opengl.egl


Interfaces

EGLSpec

Interface for accessing various EGL facilities independent of EGL versions.

Classes

EGLConfigAttributes

Class responsible for containing configuration parameters to be consumed by EGLSpec.loadConfig This contains a mapping of key value pairs for attribute names to values.

EGLConfigAttributes.Builder

Builder used to create an instance of EGLConfigAttributes Allows for a mapping of EGL configuration attributes to their corresponding values as well as including a previously generated EGLConfigAttributes instance to be used as a template and conditionally update individual mapped values

EGLManager

Class responsible for configuration of EGL related resources.

EGLVersion

Identifier for the current EGL implementation

Exceptions

EGLException

Exception class for reporting errors with EGL

Top-level functions summary

inline EGLConfigAttributes

Construct an instance of EGLConfigAttributes that includes a mapping of EGL attributes to their corresponding value.

Top-level functions

EGLConfigAttributes

inline fun EGLConfigAttributes(block: EGLConfigAttributes.Builder.() -> Unit): EGLConfigAttributes

Construct an instance of EGLConfigAttributes that includes a mapping of EGL attributes to their corresponding value. The full set of attributes can be found here: https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglChooseConfig.xhtml

The resultant array of attributes automatically is terminated with EGL_NONE.

For example to create an 8888 configuration, this can be done with the following:

EGLConfigAttributes {
EGL14.EGL_RENDERABLE_TYPE to EGL14.EGL_OPENGL_ES2_BIT
EGL14.EGL_RED_SIZE to 8
EGL14.EGL_GREEN_SIZE to 8
EGL14.EGL_BLUE_SIZE to 8
EGL14.EGL_ALPHA_SIZE to 8
EGL14.EGL_DEPTH_SIZE to 0
EGL14.EGL_CONFIG_CAVEAT to EGL14.EGL_NONE
EGL14.EGL_STENCIL_SIZE to 8
EGL14.EGL_SURFACE_TYPE to EGL14.EGL_WINDOW_BIT
}
See also
RGBA_8888