EGL 是底层原生平台窗口
与 Khronos渲染API (如OpenGL ES、OpenVG等)
之间的接口,为OpenGLES等图形API 提供渲染窗口、图形上下文(EGLContext)、同步绘制接口等机制,使其可以与不同的平台窗口建立关联关系,从而实现在不同平台上(如Android、Windows等)的渲染工作。
OpenGLES是一种与平台无关的独立图形库,在其工作之前,需要与一个实际的平台Surface窗口(如Android、Windows等)关联起来,这部分工作就是由 EGL 来实现的。
关于 EGL 其官方描述如下:
EGL™ is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG 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. EGL also provides interop capability between Khronos to enable efficient transfer of data between APIs – for example between a video subsystem running O