Home

EGL

EGL is a cross-platform interface defined by the Khronos Group that serves as a bridge between rendering APIs and the native windowing system. It provides the mechanisms to create and manage rendering contexts, surfaces, and synchronization objects, enabling portable graphics applications on embedded and desktop environments.

The primary objects in EGL are EGLDisplay, EGLConfig, EGLSurface, and EGLContext. Applications obtain a display handle

EGL supports several types of surfaces: window surfaces that render to a native window, pixmap surfaces that

Typical usage involves initializing the display, selecting a compatible config, creating a rendering context and a

To extend functionality and portability, EGL exposes extensions (for example, KHR and EXT variants) that add

with
eglGetDisplay,
initialize
it
with
eglInitialize,
choose
a
suitable
framebuffer
configuration
with
eglChooseConfig,
and
create
an
OpenGL
ES
or
OpenGL
context
with
eglCreateContext.
Window
or
pixel
buffer
surfaces
are
created
with
eglCreateWindowSurface,
eglCreatePixmapSurface,
or
eglCreatePbufferSurface,
and
a
configured
context
is
made
current
on
a
surface
via
eglMakeCurrent.
Rendering
results
are
presented
with
eglSwapBuffers.
render
to
a
platform
pixmap,
and
pbuffers
for
offscreen
rendering.
It
interfaces
with
various
native
window
systems
through
platform
backends
such
as
X11,
Wayland,
Windows,
and
Android,
among
others,
providing
a
consistent
API
regardless
of
the
underlying
platform.
surface,
making
the
context
current,
issuing
rendering
commands
through
the
bound
API
(for
example,
OpenGL
ES),
and
swapping
buffers
as
needed.
EGL
also
supports
synchronization
primitives
and
resource
sharing
between
contexts
via
extensions.
capabilities
such
as
advanced
swap
control,
additional
surface
types,
and
customized
context
attributes.
As
a
Khronos
standard,
EGL
is
widely
implemented
by
GPU
drivers
on
mobile
devices,
desktop
GPUs,
and
embedded
platforms
and
serves
as
a
key
component
of
graphics
pipelines
that
rely
on
OpenGL
ES
and
related
APIs.