# OpenGL ES

**OpenGL ES**（Open Graphics Library for Embedded Systems，嵌入式系统开放图形库）是一个跨平台、免版税的应用程序编程接口，用于渲染二维和三维图形，由[科纳斯组织](https://www.edgepedia.org/zh/khronos-group)（Khronos Group）定义为桌面版OpenGL的可嵌入子集。它去除了OpenGL中冗余的功能，使这个库更易于学习，也更易于在图形硬件更简单、更廉价且功耗要求低的设备上实现，例如电池供电的智能手机和平板电脑。<sup>[1](https://wikis.khronos.org/opengl/OpenGL_ES)</sup><sup> • </sup><sup>[2](https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html)</sup> 该API由数百个过程和函数组成，程序员用它们来指定着色器程序、这些着色器所消耗的数据，以及控制渲染的状态，从而在帧缓冲中生成三维物体的彩色图像。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 管理机构 | 科纳斯组织，该组织还在OpenGL ES注册表中发布规范、扩展注册表和头文件<sup>[4](https://registry.khronos.org/OpenGL/index_es.php)</sup> |
| 当前版本 | OpenGL ES 3.2，规范日期为2022年5月5日，配套的GLSL ES 3.20着色语言规范日期为2023年8月14日<sup>[4](https://registry.khronos.org/OpenGL/index_es.php)</sup> |
| 首次发布 | OpenGL ES 1.0，于2003年4月在英国剑桥举行的科纳斯工作组峰会上达成一致，预计于2003年7月公开发布<sup>[5](https://www.khronos.org/news/press/khronos-group-announces-opengl-es-1.0-specification-ready-for-final-review-)</sup> |
| 版本线 | 1.0、1.1、2.0、3.0、3.1和3.2规范均维护在注册表中<sup>[4](https://registry.khronos.org/OpenGL/index_es.php)</sup> |
| Android支持 | ES 2.0自Android 2.2（API级别8）起，3.0自Android 4.3（API 18）起，3.1自Android 5.0（API 21）起，3.2自Android 7.0（API 24）起；1.0和1.1版本已弃用<sup>[6](https://developer.android.com/develop/ui/views/graphics/opengl/about-opengl)</sup> |
| iOS状态 | 在iOS 12中弃用，Apple引导开发者转向Metal框架<sup>[2](https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html)</sup> |
| 相关标准 | 网页三维标准WebGL基于OpenGL ES，并使用OpenGL ES着色语言<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup> |

## 目的与设计

OpenGL ES将相当庞大的桌面版OpenGL API精简至最基本的要素，以便在硬件性能和电池功耗预算有限的设备上运行。它在运行Apple iOS和Google Android操作系统的智能手机上作为标准配置提供。<sup>[1](https://wikis.khronos.org/opengl/OpenGL_ES)</sup> 对程序员而言，该API是一组用于指定着色器、几何图形和纹理图像的命令，着色器控制几何处理、光栅化以及片元的照明与着色，最终在帧缓冲中生成渲染后的几何图形。对实现者而言，它是一组控制GPU的命令；现代GPU加速几乎所有操作，但规范也允许在能力较弱的GPU上实现，甚至在没有GPU的情况下通过将部分或全部操作转移到主机CPU上来实现。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup>

该规范面向能力各异的多种图形平台编写。对于某些操作，它规定的是理想行为而非实际行为，并附有实现在逼近该理想行为时必须遵守的规则，因此两个不同的实现即使帧缓冲配置完全相同，对同一输入也可能无法做到逐像素一致。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup>

OpenGL ES本身不创建上下文，也不配置默认帧缓冲；这些工作属于配套的窗口系统API。在移动和嵌入式设备上，配套API是EGL，即科纳斯原生平台图形接口；在iOS上，Apple的EAGL API承担同样的角色。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup>

## 版本

第一个版本OpenGL ES 1.0由科纳斯OpenGL ES工作组于2003年4月14日至15日在英国剑桥举行的峰会上达成一致，并准备提交批准；公开发布预计在2003年7月。科纳斯将其描述为一个免版税、开放标准、具备三维能力的图形API，面向移动和嵌入式平台。<sup>[5](https://www.khronos.org/news/press/khronos-group-announces-opengl-es-1.0-specification-ready-for-final-review-)</sup> 到2004年2月，已有十多家科纳斯成员宣布将OpenGL ES 1.0纳入移动产品。<sup>[7](https://www.khronos.org/news/press/opengl-es-mobile-graphics-api-demonstrates-industry-wide-acceptance)</sup>

注册表维护1.0、1.1、2.0、3.0、3.1和3.2版本的规范，每个版本都配套一个OpenGL ES着色语言（GLSL ES）版本：ES 2.0对应1.00，ES 3.0对应3.00，ES 3.1对应3.10，ES 3.2对应3.20。<sup>[4](https://registry.khronos.org/OpenGL/index_es.php)</sup> 当前版本为OpenGL ES 3.2，其规范日期为2022年5月5日。<sup>[4](https://registry.khronos.org/OpenGL/index_es.php)</sup>

## 着色器与管线

现代OpenGL ES是一个基于着色器的API。着色器规定数据在处理管线的可编程阶段中移动时所要执行的操作，从应用程序提供的顶点开始，到写入帧缓冲的片元结束。着色器源代码被加载到着色器对象中并编译；一个或多个着色器对象被附加到程序对象上，程序对象经链接生成可执行代码。实现必须支持着色器编译，还可以额外支持加载预编译的着色器或程序二进制文件。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup>

OpenGL ES 3.2管线包含六个可编程处理器：顶点、曲面细分控制、曲面细分评估、几何、片元和计算。这些处理器的编译单元就是相应的着色器类型，一个程序包含一个或多个连续阶段的可执行代码。<sup>[8](https://registry.khronos.org/OpenGL/specs/es/3.2/GLSL_ES_Specification_3.20.html)</sup> 曲面细分根据固定或由着色器计算的细节级别，将三角形或四边形面片细分为更小的图元，仅当曲面细分控制着色器和曲面细分评估着色器同时存在时才激活。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup> 几何着色器对装配好的输入图元进行操作，可以发出数量可变的输出顶点；包含几何着色器的程序还必须包含顶点着色器。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup> 计算着色器在分派的工作组中运行通用计算工作，位于图形管线之外，通过对图像、存储缓冲和原子计数器的修改产生可见的副作用。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup><sup> • </sup><sup>[8](https://registry.khronos.org/OpenGL/specs/es/3.2/GLSL_ES_Specification_3.20.html)</sup>

OpenGL ES 3.2实现保证支持GLSL ES 3.20、3.10、3.00和1.00版本，一般而言，为较早API版本编写的着色器在3.2下无需修改即可工作。然而，OpenGL ES 2.0和3.0 API不支持用GLSL ES 3.20编写的着色器，链接用不同语言版本编写的着色器会报错。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup><sup> • </sup><sup>[8](https://registry.khronos.org/OpenGL/specs/es/3.2/GLSL_ES_Specification_3.20.html)</sup>

## 平台采用

**Android。** Android通过其框架API和原生开发套件支持OpenGL ES。2.0版本自Android 2.2（API级别8）起受支持，3.0自Android 4.3（API级别18）起，3.1自Android 5.0（API级别21）起，3.2自Android 7.0（API级别24）起。3.x API向后兼容2.0，因此应用程序可以在清单中要求2.0，并在运行时检查3.x特性。除非设备制造商提供图形管线的实现，否则设备无法支持3.0 API。1.0和1.1版本仍然存在，但已弃用。<sup>[6](https://developer.android.com/develop/ui/views/graphics/opengl/about-opengl)</sup>

**iOS。** Apple的iOS框架提供了OpenGL ES 1.1、2.0和3.0版本的实现，由EAGLContext对象管理渲染状态。Apple在iOS 12中弃用了OpenGL ES，并引导编写高性能GPU代码的开发者转向Metal。<sup>[2](https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html)</sup><sup> • </sup><sup>[9](https://developer.apple.com/documentation/opengles?changes=latest_mi_3&language=objc)</sup>

**Web。** WebGL是一个跨平台、免版税的网页标准，提供基于OpenGL ES的低级三维图形API。它是一个基于着色器的API，使用OpenGL ES着色语言，其构造在语义上类似于底层API，并为[JavaScript](https://www.edgepedia.org/zh/javascript)等自动管理内存的语言做出了让步。<sup>[3](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)</sup>

## 一致性与当前状态

科纳斯运营一个采纳者计划：希望使用OpenGL ES名称和商标的实现者需运行正式的一致性测试套件，并提交结果供工作组审查。2015年，OpenGL ES工作组将其一致性测试开源，并鼓励采纳者提交针对3.2.2版本测试的结果。<sup>[10](https://www.khronos.org/news/press/khronos-open-sources-opengl-and-opengl-es-conformance-tests)</sup> 科纳斯发布了一份产品通过OpenGL ES一致性测试的公司名单。<sup>[11](https://www.khronos.org/conformance/adopters/conformant-companies/)</sup>

在Android上，Vulkan已成为主要的低级图形API，取代了OpenGL ES——后者仍受支持，但不再处于活跃的功能开发中。Vulkan在图形驱动中提供更低的CPU开销，以及OpenGL ES所不具备的特性，例如无绑定API和光线追踪。ANGLE项目在Vulkan之上实现了符合规范的OpenGL ES API，[Android 15](https://www.edgepedia.org/zh/android-15)及更高版本将ANGLE作为可选层包含在内，用于在Vulkan上运行OpenGL ES。<sup>[12](https://developer.android.com/games/develop/vulkan/overview?authuser=8)</sup>

## References

1. [OpenGL ES, OpenGL Wiki (Khronos Group)](https://wikis.khronos.org/opengl/OpenGL_ES)
2. [About OpenGL ES, OpenGL ES Programming Guide, Apple Developer Documentation Archive](https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html)
3. [OpenGL ES 3.2 Specification (May 5, 2022), Khronos Group](https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf)
4. [Khronos OpenGL ES Registry](https://registry.khronos.org/OpenGL/index_es.php)
5. [Khronos Group Announces OpenGL ES 1.0 Specification Ready for Final Review and Ratification (April 29, 2003)](https://www.khronos.org/news/press/khronos-group-announces-opengl-es-1.0-specification-ready-for-final-review-)
6. [OpenGL ES, Android Developers](https://developer.android.com/develop/ui/views/graphics/opengl/about-opengl)
7. [OpenGL ES Mobile Graphics API Demonstrates Industry-wide Acceptance (February 24, 2004)](https://www.khronos.org/news/press/opengl-es-mobile-graphics-api-demonstrates-industry-wide-acceptance)
8. [The OpenGL ES Shading Language, Version 3.20.8 (August 14, 2023)](https://registry.khronos.org/OpenGL/specs/es/3.2/GLSL_ES_Specification_3.20.html)
9. [OpenGL ES, Apple Developer Documentation](https://developer.apple.com/documentation/opengles?changes=latest_mi_3&language=objc)
10. [Khronos Places OpenGL and OpenGL ES Conformance Tests into Open Source (2015)](https://www.khronos.org/news/press/khronos-open-sources-opengl-and-opengl-es-conformance-tests)
11. [Khronos Conformant Companies](https://www.khronos.org/conformance/adopters/conformant-companies/)
12. [Use Vulkan for graphics, Android game development](https://developer.android.com/games/develop/vulkan/overview?authuser=8)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Frameworks, libraries, and APIs › Graphics and multimedia APIs

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/opengl-es

English original: https://www.edgepedia.org/opengl-es
