EGL (API): Difference between revisions

Content deleted Content added
Mpd (talk | contribs)
Added elements section
Undid revision 1104394974 by Mpd (talk) Previous submission added copyrighted material. iThenticate report: https://api.ithenticate.com/en_us/dv/20220511?lang=en_us&o=88998446 CopyPatrol permalink: https://copypatrol.toolforge.org/en/?id=88998446
Line 18:
 
The acronym ''EGL'' is an [[initialism]], which starting from EGL version 1.2 refers to ''Khronos Native Platform Graphics Interface''.<ref>[http://www.khronos.org/registry/egl/specs/eglspec.1.2.pdf EGL 1.2 Specification]</ref> Prior to version 1.2, the name of the EGL specification was ''OpenGL ES Native Platform Graphics Interface''.<ref>[http://www.khronos.org/registry/egl/specs/eglspec.1.0.pdf EGL 1.0 Specification]</ref> [[X.Org Foundation|X.Org]] development documentation glossary defines EGL as "Embedded-System Graphics Library".<ref>[http://www.x.org/wiki/Development/Documentation/Glossary#EGL EGL in X.Org development documentation glossary]</ref>
 
== Elements ==
 
=== Client APIs ===
 
Rendering APIs such as [[OpenCL]], [[OpenGL]], [[OpenGL ES]] or [[OpenVG]].
 
=== Display ===
 
All EGL objects are associated with an EGLDisplay,
and exist in a namespace defined by that display.<ref name="eglspec15">[http://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf EGL 1.5 Specification]</ref>
 
It also defines EGL extensions through the eglQueryString() call.
 
=== Configuration ===
 
The configuration is used to create EGLSurface and EGLContext.
 
The EGLConfig describes the depth of the color buffer components and the types, quantities and
sizes of the ancillary buffers (i.e., the depth, multisample, and stencil buffers).<ref name="eglspec15" />
 
=== Context ===
 
The definition of contexts depends on the client API,
but usually represents the state vector of an abstract machine
describing the client API and allows executing client API
commands with respect to that state vector.<ref name="eglspec15" />
 
The client APIs rely on an implicit context used by all entry points,
rather than passing an explicit context parameter.
The implicit contexts used by these APIs are called current contexts.
 
The client API specifications are intentionally vague on how a rendering context
(e.g. the state machine defined by a client API) is created.
 
Contexts for different client APIs all share the color buffer of a surface.
 
Each thread can have at most one current rendering context for each supported
client API; for example, there may be both a current OpenGL ES context and
a current OpenVG context in an implementation supporting both of these APIs.
In addition, a context can be current to only one thread at a time.
 
=== Surface ===
 
Surface is an opaque type representing a drawing surface which client
APIs can render content into using current context.
 
Ancillary buffers are associated with an EGLSurface, not with a context.
If several contexts are all writing to the same surface,
they will share those buffers.<ref name="eglspec15" />
 
The various buffers that may be contained by an EGLSurface, and the
EGLConfig attributes controlling their creation.
 
=== Buffer ===
 
Not all buffers are used or required by all client APIs.
 
The ''color buffer'' contains pixel color values, and is shared by all client APIs
rendering to a surface.
 
The ''alpha mask buffer'' is used only by OpenVG.
 
The ''depth buffer'' is shared by OpenGL and OpenGL ES. It contains fragment
depth (Z) information generated during rasterization.
 
The ''stencil buffer'' is shared by OpenGL and OpenGL ES. It contains fragment
stencil information generated during rasterization.
 
The ''multisample buffer'' may be shared by OpenGL, OpenGL ES and OpenVG,
although such sharing cannot be guaranteed.
It contains multisample information (color values, and possibly stencil and depth values)
generated by multisample rasterization.<ref name="eglspec15" />
 
== Adoption ==
Line 109 ⟶ 36:
* The [[Wayland (display server protocol)|Wayland]] display server protocol uses EGL.<ref>{{Cite web | url=http://ppaalanen.blogspot.com/2012/03/what-does-egl-do-in-wayland-stack.html | title=Pekka Paalanen: What does EGL do in the Wayland stack | date=10 March 2012 }}</ref> It is implemented in a way that Wayland clients will draw directly to the framebuffer using EGL.
* [[Mesa 3D (OpenGL)|Mesa 3D]] has an implementation of EGL formerly known as Eagle.<ref>[http://www.mesa3d.org/egl.html Mesa EGL]</ref>
* The [[Mir (display server protocol)|Mir]] display server protocol by [[Canonical Ltd.]] uses EGL.<ref>{{Cite web |url=https://wiki.ubuntu.com/MirSpec |title=Archived copyMirSpec |access-date=2013-03-07 |archive-date=2013-03-06 |archive-url=https://web.archive.org/web/20130306104754/https://wiki.ubuntu.com/MirSpec |url-status=dead }}</ref>
* The [[Simple DirectMedia Layer]] toolkit has been ported to use EGL. It can use [[Xlib]], write directly to the [[framebuffer]] or use EGL.
* The [[Raspberry Pi]] single-board computer has an EGL interface to hardware-accelerated 3D graphics rendering.<ref>http://elinux.org/RPi_VideoCore_APIs</ref>