这是用户在 2024-9-26 15:38 为 https://app.immersivetranslate.com/pdf-pro/aaecd964-efd1-4638-a76f-bdf7c630095d 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

OpenGL ® ® ^(®){ }^{\circledR} ES
Version 3.2 (May 5, 2022)
OpenGL ® ® ^(®){ }^{\circledR} ES 3.2 版(2022 年 5 月 5 日)

Editor: Jon Leech 编辑乔恩-利奇
Copyright © 2006-2022 The Khronos Group Inc. All Rights Reserved.
版权所有 © 2006-2022 Khronos Group Inc.版权所有。
This specification is protected by copyright laws and contains material proprietary to Khronos. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos.
本规范受版权法保护,包含 Khronos 专有的资料。除本条款所述情况外,未经 Khronos 事先明确书面许可,不得以任何方式复制、再版、分发、传播、展示、广播或以其他方式利用本规范或其任何组成部分。
This specification has been created under the Khronos Intellectual Property Rights Policy, which is Attachment A of the Khronos Group Membership Agreement available at www.khronos.org/files/member_agreement.pdf. Khronos grants a conditional copyright license to use and reproduce the unmodified specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms. Parties desiring to implement the specification and make use of Khronos trademarks in relation to that implementation, and receive reciprocal patent license protection under the Khronos IP Policy must become Adopters and confirm the implementation as conformant under the process defined by Khronos for this specification; see https://www.khronos.org/adopters.
本规范是根据 Khronos 知识产权政策创建的,该政策是 Khronos 集团成员协议的附件 A,可从 www.khronos.org/files/member_agreement.pdf 获取。Khronos 授予有条件的版权许可,允许出于任何目的使用和复制未经修改的规范,无需支付任何费用或版税,但这些条款不授予任何专利、商标或其他知识产权的许可。希望实施本规范并在实施中使用 Khronos 商标,以及根据 Khronos 知识产权政策获得互惠专利许可保护的各方必须成为采用者,并根据 Khronos 为本规范定义的流程确认实施符合本规范;请参阅 https://www.khronos.org/adopters
Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will Khronos, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.
克罗诺斯不对本规范做出任何明示或暗示的陈述或保证,包括但不限于:适销性、特定用途的适用性、不侵犯任何知识产权、正确性、准确性、完整性、及时性和可靠性。在任何情况下,Khronos 或其任何推广者、贡献者或成员,或其各自的合作伙伴、管理人员、董事、雇员、代理或代表,均不对因这些材料引起的或与这些材料有关的任何损失承担责任,无论是直接、间接、特殊或后果性的损失,如收入损失、利润损失或其他损失。
Vulkan and Khronos are registered trademarks, and WebGL and EGL are trademarks of The Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC; OpenCL is a trademark of Apple Inc.; and OpenGL is a registered trademark, and the OpenGL ES and OpenGL SC logos are trademarks of Hewlett Packard Enterprise, all used under license by Khronos. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.
Vulkan 和 Khronos 是注册商标,WebGL 和 EGL 是 Khronos Group Inc.ASTC 是 ARM Holdings PLC 的商标;OpenCL 是苹果公司的商标;OpenGL 是惠普公司的注册商标,OpenGL ES 和 OpenGL SC 徽标是惠普公司的商标,均由 Khronos 许可使用。所有其他产品名称、商标和/或公司名称仅用于识别,归各自所有者所有。

Contents 目录

1 Introduction … 1 1 引言 ... 1
1.1 Formatting of the OpenGL ES Specification … 1
1.1 OpenGL ES 规范的格式 ... 1

1.2 What is the OpenGL ES Graphics System? … 1
1.2 什么是 OpenGL ES 图形系统?... 1

1.3 Programmer’s View of OpenGL ES … 2
1.3 程序员眼中的 OpenGL ES ... 2

1.4 Implementor’s View of OpenGL ES … 2
1.4 实施者眼中的 OpenGL ES ... 2

1.5 Our View … 3
1.5 我们的观点 ... 3

1.6 Related APIs … 3
1.6 相关 API ... 3

1.6.1 OpenGL ES Shading Language … 3
1.6.1 OpenGL ES着色语言 ... 3

1.6.2 WebGL … 4 1.6.2 WebGL ... 4
1.6.3 Window System Bindings … 4
1.6.3 窗口系统绑定 ... 4

1.6.4 OpenCL … 4 1.6.4 OpenCL ... 4
1.7 Filing Bug Reports … 5
1.7 提交错误报告...... 5

2 OpenGL ES Fundamentals … 6
2 OpenGL ES 基础 ... 6

2.1 OpenGL ES Fundamentals … 6
2.1 OpenGL ES 基础知识 ... 6

2.2 Command Syntax … 8
2.2 命令语法 ... 8

2.2.1 Data Conversion For State-Setting Commands … 10
2.2.1 状态设置命令的数据转换 ... 10

2.2.2 Data Conversions For State Query Commands … 12
2.2.2 状态查询命令的数据转换 ... 12

2.3 Command Execution … 13
2.3 执行命令 ... 13

2.3.1 Errors … 13 2.3.1 错误 ... 13
2.3.2 Graphics Reset Recovery … 16
2.3.2 图形重置恢复 ... 16

2.3.3 Flush and Finish … 17
2.3.4 Numeric Representation and Computation … 18
2.3.5 Fixed-Point Data Conversions … 22
2.4 Rendering Commands … 24
2.4 渲染命令 ... 24

2.5 Context State … 24
2.5.1 Generic Context State Queries … 25
2.6 Objects and the Object Model … 25
2.6.1 Object Management … 25
2.6.1 对象管理 .... 25

2.6.2 Buffer Objects … 26
2.6.3 Shader Objects … 27
2.6.3 着色对象 ... 27

2.6.4 Program Objects … 27
2.6.4 程序对象 ... 27

2.6.5 Program Pipeline Objects … 27
2.6.6 Texture Objects … 27
2.6.6 纹理对象 .... 27

2.6.7 Sampler Objects … 28
2.6.7 采样器对象 ... 28

2.6.8 Renderbuffer Objects … 28
2.6.8 渲染缓冲区对象 ... 28

2.6.9 Framebuffer Objects … 28
2.6.10 Vertex Array Objects … 28
2.6.10 顶点阵列对象 ... 28

2.6.11 Transform Feedback Objects … 29
2.6.11 转换反馈对象 ... 29

2.6.12 Query Objects … 29
2.6.12 查询对象 ... 29

2.6.13 Sync Objects … 29
2.6.13 同步对象 ... 29

3 Dataflow Model … 30
3 数据流模型 ... 30

4 Event Model … 33
4 事件模型 ... 33

4.1 Sync Objects and Fences … 33
4.1 同步对象和栅栏 ... 33

4.1.1 Waiting for Sync Objects … 35
4.1.1 等待同步对象 ... 35

4.1.2 Signaling … 37
4.1.3 Sync Object Queries … 38
4.1.3 同步对象查询 ... 38

4.2 Query Objects and Asynchronous Queries … 39
4.2 查询对象和异步查询 ... 39

4.2.1 Query Object Queries … 42
5 Shared Objects and Multiple Contexts … 44
5.1 Object Deletion Behavior … 44
5.1.1 Side Effects of Shared Context Destruction … 44
5.1.2 Automatic Unbinding of Deleted Objects … 45
5.1.2 自动解除已删除对象的绑定 ........................................................

5.1.3 Deleted Object and Object Name Lifetimes … 45
5.2 Sync Objects and Multiple Contexts … 46
5.3 Propagating Changes to Objects … 46
5.3.1 Determining Completion of Changes to an object … 47
5.3.2 Definitions … 47 5.3.2 定义 ... 47
5.3.3 Rules … 48 5.3.3 规则...... 48
6 Buffer Objects … 50
6 缓冲区对象 ... 50

6.1 Creating and Binding Buffer Objects … 51
6.1 创建和绑定缓冲区对象 ... 51

6.1.1 Binding Buffer Objects to Indexed Targets … 53
6.2 Creating and Modifying Buffer Object Data Stores … 54
6.2 创建和修改缓冲对象数据存储 .........................................................

6.3 Mapping and Unmapping Buffer Data … 56
6.3 映射和取消映射缓冲区数据 .........................................................

6.3.1 Unmapping Buffers … 60
6.3.2 Effects of Mapping Buffers on Other GL Commands … 60
6.3.2 映射缓冲区对其他 GL 命令的影响 .................................................

6.4 Effects of Accessing Outside Buffer Bounds … 61
6.4 在缓冲区界限之外访问的影响 .....................................................

6.5 Copying Between Buffers … 61
6.6 Buffer Object Queries … 62
6.6.1 Indexed Buffer Object Limits and Binding Queries … 63
6.6.1 索引缓冲区对象限制和绑定查询 ...................................................

6.7 Buffer Object State … 65
7 Programs and Shaders … 66
7 程序和着色器 ... 66

7.1 Shader Objects … 67
7.1 着色器对象 .... 67

7.2 Shader Binaries … 70
7.2 着色器二进制文件 ... 70

7.3 Program Objects … 71
7.3 程序对象 ... 71

7.3.1 Program Interfaces … 79
7.4 Program Pipeline Objects … 94
7.4 程序管道对象 ... 94

7.4.1 Shader Interface Matching … 97
7.4.1 着色器接口匹配 .... 97

7.4.2 Program Pipeline Object State … 99
7.5 Program Binaries … 100
7.5 程序二进制文件 ... 100

7.6 Uniform Variables … 102
7.6 统一变量...... 102

7.6.1 Loading Uniform Variables In The Default Uniform Block … 108
7.6.1 在默认统一程序块中加载统一变量 .............................................

7.6.2 Uniform Blocks … 111
7.6.3 Uniform Buffer Object Bindings … 115
7.6.3 统一缓冲区对象绑定 .... 115

7.7 Atomic Counter Buffers … 116
7.7 原子计数器缓冲区 ... 116

7.7.1 Atomic Counter Buffer Object Storage … 116
7.7.1 原子计数器缓冲区对象存储 ... 116

7.7.2 Atomic Counter Buffer Bindings … 117
7.8 Shader Buffer Variables and Shader Storage Blocks … 117
7.9 Samplers … 119 7.9 采样器 ... 119
7.10 Images … 120 7.10 图像 ... 120
7.11 Shader Memory Access … 120
7.11 着色器内存访问 ... 120

7.11.1 Shader Memory Access Ordering … 121
7.11.1 着色器内存访问排序 ... 121

7.11.2 Shader Memory Access Synchronization … 123
7.12 Shader, Program, and Program Pipeline Queries … 127
7.13 Required State … 135
7.13 所需的状态 ... 135

8 Textures and Samplers … 137
8 纹理和采样器 ... 137

8.1 Texture Objects … 138
8.1 纹理对象 ... 138

8.2 Sampler Objects … 140
8.2 采样器对象 ... 140

8.3 Sampler Object Queries … 143
8.3 采样器对象查询 ... 143

8.4 Pixel Rectangles … 144
8.4 矩形像素 ... 144

8.4.1 Pixel Storage Modes and Pixel Buffer Objects … 144
8.4.2 Transfer of Pixel Rectangles … 146
8.5 Texture Image Specification … 157
8.5 纹理图像规范 ... 157

8.5.1 Required Texture Formats … 160
8.5.2 Encoding of Special Internal Formats … 160
8.5.3 Texture Image Structure … 164
8.5.3 纹理图像结构 ... 164

8.6 Alternate Texture Image Specification Commands … 167
8.6.1 Texture Copying Feedback Loops … 177
8.7 Compressed Texture Images … 177
8.7 压缩纹理图像 ... 177

8.8 Multisample Textures … 183
8.8 多采样纹理 .... 183

8.9 Buffer Textures … 185
8.9 缓冲纹理 .... 185

8.10 Texture Parameters … 188
8.10 纹理参数 ... 188

8.11 Texture Queries … 191
8.11 纹理查询 ... 191

8.11.1 Active Texture … 191
8.11.2 Texture Parameter Queries … 191
8.11.2 纹理参数查询 .... 191

8.11.3 Texture Level Parameter Queries … 192
8.12 Depth Component Textures … 193
8.13 Cube Map Texture Selection … 194
8.13 立方体贴图纹理选择 ... 194

8.13.1 Seamless Cube Map Filtering … 194
8.14 Texture Minification … 195
8.14 纹理最小化 ... 195

8.14.1 Scale Factor and Level of Detail … 195
8.14.2 Coordinate Wrapping and Texel Selection … 197
8.14.3 Mipmapping … 202
8.14.4 Manual Mipmap Generation … 204
8.15 Texture Magnification … 205
8.15 纹理放大...... 205

8.16 Combined Depth/Stencil Textures … 205
8.17 Texture Completeness … 205
8.17 纹理完整性...... 205

8.17.1 Effects of Sampler Objects on Texture Completeness … 207
8.17.2 Effects of Completeness on Texture Application … 207
8.17.2 完整性对纹理应用的影响 .....................................................

8.17.3 Effects of Completeness on Texture Image Specification … 207
8.18 Immutable-Format Texture Images … 207
8.19 Texture State … 211
8.19 纹理状态 ... 211

8.20 Texture Comparison Modes … 212
8.20 纹理对比模式 ... 212

8.20.1 Depth Texture Comparison Mode … 212
8.20.1 深度纹理比较模式 ... 212

8.21 sRGB Texture Color Conversion … 213
8.21 sRGB 纹理颜色转换 ... 213

8.22 Shared Exponent Texture Color Conversion … 215
8.22 共享指数纹理颜色转换 ... 215

8.23 Texture Image Loads and Stores … 215
8.23 纹理图像的加载和存储 ... 215

8.23.1 Image Unit Queries … 221
8.23.1 图像单元查询 ... 221

9 Framebuffers and Framebuffer Objects … 222
9 帧缓冲器和帧缓冲器对象 ... 222

9.1 Framebuffer Overview … 222
9.1 帧缓冲器概述 ... 222

9.2 Binding and Managing Framebuffer Objects … 224
9.2.1 Framebuffer Object Parameters … 227
9.2.2 Attaching Images to Framebuffer Objects … 229
9.2.3 Framebuffer Object Queries … 230
9.2.4 Renderbuffer Objects … 234
9.2.4 渲染缓冲区对象 ... 234

9.2.5 Required Renderbuffer Formats … 237
9.2.6 Renderbuffer Object Queries … 238
9.2.6 渲染缓冲区对象查询 ... 238

9.2.7 Attaching Renderbuffer Images to a Framebuffer … 238
9.2.7 将渲染缓冲区图像附加到帧缓冲区 .... 238

9.2.8 Attaching Texture Images to a Framebuffer … 240
9.3 Feedback Loops Between Textures and the Framebuffer … 245
9.3.1 Rendering Feedback Loops … 245
9.3.1 渲染反馈回路 ... 245

9.3.2 Texture Copying Feedback Loops … 247
9.4 Framebuffer Completeness … 247
9.4.1 Framebuffer Attachment Completeness … 248
9.4.2 Whole Framebuffer Completeness … 249
9.4.3 Required Framebuffer Formats … 252
9.4.4 Effects of Framebuffer Completeness on Framebuffer Op-
9.4.4 帧缓冲区完整性对帧缓冲区运算的影响

erations … 252 252
9.4.5 Effects of Framebuffer State on Framebuffer Dependent
9.4.5 帧缓冲器状态对帧缓冲器依赖性的影响

Values … 253 价值 ... 253
9.5 Mapping between Pixel and Element in Attached Image … 253
9.6 Conversion to Framebuffer-Attachable Image Components … 254
9.7 Conversion to RGBA Values … 254
9.8 Layered Framebuffers … 254
10 Vertex Specification and Drawing Commands … 256
10.1 Primitive Types … 258
10.1 原始类型 ... 258

10.1.1 Points … 258
10.1.2 Line Strips … 258
10.1.3 Line Loops … 258
10.1.4 Separate Lines … 258
10.1.5 Triangle Strips … 259
10.1.6 Triangle Fans … 260
10.1.7 Separate Triangles … 260
10.1.8 Lines with Adjacency … 260
10.1.8 邻接线...... 260

10.1.9 Line Strips with Adjacency … 260
10.1.9 邻接线段 ... 260

10.1.10 Triangles with Adjacency … 262
10.1.11 Triangle Strips with Adjacency … 263
10.1.12 Separate Patches … 263
10.1.13 General Considerations For Polygon Primitives … 264
10.2 Current Vertex Attribute Values … 265
10.2 当前顶点属性值 ... 265

10.2.1 Current Generic Attributes … 265
10.2.2 Vertex Attribute Queries … 266
10.2.2 顶点属性查询 ... 266

10.2.3 Required State … 266
10.3 Vertex Arrays … 266
10.3 顶点阵列 ... 266

10.3.1 Specifying Arrays for Generic Vertex Attributes … 267
10.3.2 Vertex Attribute Divisors … 271
10.3.3 Transferring Array Elements … 272
10.3.4 Primitive Restart … 273
10.3.5 Robust Buffer Access … 273
10.3.6 Packed Vertex Data Formats … 274
10.3.7 Vertex Arrays in Buffer Objects … 274
10.3.8 Array Indices in Buffer Objects … 275
10.3.8 缓冲对象中的数组索引 ... 275

10.3.9 Indirect Commands in Buffer Objects … 275
10.4 Vertex Array Objects … 276
10.4 顶点阵列对象 ... 276

10.5 Drawing Commands Using Vertex Arrays … 277
10.6 Vertex Array and Vertex Array Object Queries … 284
10.6 顶点阵列和顶点阵列对象查询 ...................................................

10.7 Required State … 286
10.7 所需的状态 ... 286

11 Programmable Vertex Processing … 288
11 可编程顶点处理 ... 288

11.1 Vertex Shaders … 288
11.1 顶点着色器 ... 288

11.1.1 Vertex Attributes … 288
11.1.1 顶点属性 ... 288

11.1.2 Vertex Shader Variables … 293
11.1.2 顶点着色器变量 ... 293

11.1.3 Shader Execution … 297
11.1.3 着色器的执行 ... 297

11.2 Tessellation … 308 11.2 细分...... 308
11.2.1 Tessellation Control Shaders … 309
11.2.1 细分控制着色器 ... 309

11.2.2 Tessellation Primitive Generation … 314
11.2.3 Tessellation Evaluation Shaders … 322
11.2.3 细分评估着色器 ... 322

11.3 Geometry Shaders … 327
11.3 几何着色器 ... 327

11.3.1 Geometry Shader Input Primitives … 328
11.3.1 几何着色器输入基元 .... 328

11.3.2 Geometry Shader Output Primitives … 329
11.3.2 几何着色器输出基元 ... 329

11.3.3 Geometry Shader Variables … 330
11.3.3 几何着色器变量 ... 330

11.3.4 Geometry Shader Execution Environment … 330
11.3.4 几何着色器执行环境 ... 330

12 Fixed-Function Vertex Post-Processing … 335
12 固定函数顶点后处理 ... 335

12.1 The Last Vertex Processing Stage … 335
12.1 最后顶点处理阶段 ... 335

12.2 Transform Feedback … 336
12.2 转换反馈 ... 336

12.2.1 Transform Feedback Objects … 336
12.2.1 转换反馈对象 ... 336

12.2.2 Transform Feedback Primitive Capture … 339
12.3 Primitive Queries … 344
12.3 原始查询 ... 344

12.4 Flatshading … 345 12.4 平阴影...... 345
12.5 Primitive Clipping … 346
12.5 原始剪切...... 346

12.5.1 Clipping Shader Outputs … 346
12.5.1 剪切着色器输出 ... 346

12.6 Coordinate Transformations … 347
12.6 坐标变换 ... 347

12.6.1 Controlling the Viewport … 347
12.6.1 控制视口 ... 347

13 Fixed-Function Primitive Assembly and Rasterization … 350
13 固定功能基元组装和光栅化 ... 350

13.1 Discarding Primitives Before Rasterization … 352
13.2 Primitive Bounding Box … 352
13.2 原始边框...... 352

13.3 Invariance … 353 13.3 不变性...... 353
13.4 Multisampling … 354 13.4 多重取样 ... 354
13.4.1 Sample Shading … 356
13.4.1 阴影样本 ... 356

13.5 Points … 356 13.5 分 ... 356
13.5.1 Basic Point Rasterization … 357
13.5.1 基本点光栅化...... 357

13.5.2 Point Multisample Rasterization … 357
13.6 Line Segments … 357
13.6.1 Basic Line Segment Rasterization … 358
13.6.1 基本线段光栅化... 358

13.6.2 Other Line Segment Features … 360
13.6.3 Line Rasterization State … 362
13.6.3 线条光栅化状态 ... 362

13.6.4 Line Multisample Rasterization … 362
13.6.4 线条多采样光栅化 ... 362

13.7 Polygons … 363 13.7 多边形 ... 363
13.7.1 Basic Polygon Rasterization … 363
13.7.1 基本多边形光栅化... 363

13.7.2 Depth Offset … 366
13.7.2 深度偏移...... 366

13.7.3 Polygon Multisample Rasterization … 367
13.7.4 Polygon Rasterization State … 367
13.7.4 多边形光栅化状态... 367

13.8 Early Per-Fragment Tests … 367
13.8.1 Pixel Ownership Test … 368
13.8.1 像素所有权测试...... 368

13.8.2 Scissor Test … 368
13.8.3 Multisample Fragment Operations … 369
13.8.4 The Early Fragment Test Qualifier … 370
13.8.4 早期片段测试限定符...... 370

14 Programmable Fragment Processing … 371
14 可编程片段处理 ... 371

14.1 Fragment Shader Variables … 371
14.1 片段着色器变量 ... 371

14.2 Shader Execution … 372
14.2 着色器的执行 ... 372

14.2.1 Texture Access … 373
14.2.1 纹理访问 ... 373

14.2.2 Shader Inputs … 373
14.2.2 着色器输入 ... 373

14.2.3 Shader Outputs … 376
14.2.3 着色器输出 ... 376

14.2.4 Early Fragment Tests … 378
15 Writing Fragments and Samples to the Framebuffer … 379
15.1 Per-Fragment Operations … 379
15.1 每碎片操作 ... 379

15.1.1 Alpha To Coverage … 379
15.1.2 Stencil Test … 381
15.1.3 Depth Buffer Test … 383
15.1.4 Occlusion Queries … 383
15.1.4 遮挡查询...... 383

15.1.5 Blending … 384 15.1.5 混合 ... 384
15.1.6 sRGB Conversion … 395
15.1.6 sRGB 转换 ... 395

15.1.7 Dithering … 395 15.1.7 颤振...... 395
15.1.8 Additional Multisample Fragment Operations … 396
15.2 Whole Framebuffer Operations … 397
15.2 整帧缓冲区操作 ... 397

15.2.1 Selecting Buffers for Writing … 397
15.2.1 选择用于写入的缓冲区 .... 397

15.2.2 Fine Control of Buffer Updates … 399
15.2.3 Clearing the Buffers … 400
15.2.3 清除缓冲区 ... 400

15.2.4 Invalidating Framebuffer Contents … 403
16 Reading and Copying Pixels … 406
16 读取和复制像素 ... 406

16.1 Reading Pixels … 406
16.1 读取像素 ... 406

16.1.1 Selecting Buffers for Reading … 406
16.1.2 ReadPixels … 407 16.1.2 读取像素 ... 407
16.1.3 Obtaining Pixels from the Framebuffer … 409
16.1.4 Conversion of RGBA values … 410
16.1.4 转换 RGBA 值 ... 410

16.1.5 Final Conversion … 410
16.1.5 最终转换...... 410

16.1.6 Placement in Pixel Pack Buffer or Client Memory … 411
16.2 Copying Pixels … 412
16.2 复制像素 ... 412

16.2.1 Blitting Pixel Rectangles … 412
16.2.2 Copying Between Images … 415
16.2.2 在图像之间复制 ... 415

16.3 Pixel Draw and Read State … 420
16.3 像素绘制和读取状态 ... 420

17 Compute Shaders … 421
17 计算着色器 ... 421

17.1 Compute Shader Variables … 423
17.1 计算着色器变量 ... 423

18 Debug Output … 424
18 调试输出 ... 424

18.1 Debug Messages … 425
18.1 调试信息 ... 425

18.2 Debug Message Callback … 427
18.2 调试消息回调... 427

18.3 Debug Message Log … 428
18.3 调试消息日志 ... 428

18.4 Controlling Debug Messages … 429
18.4 控制调试信息... 429

18.5 Externally Generated Messages … 430
18.6 Debug Groups … 430
18.6 调试组 ... 430

18.7 Debug Labels … 432
18.7 调试标签 ... 432

18.8 Asynchronous and Synchronous Debug Output … 433
18.8 异步和同步调试输出 ... 433

18.9 Debug Output Queries … 434
18.9 调试输出查询 ... 434

19 Special Functions … 437
19 特殊功能 ... 437

19.1 Hints … 437 19.1 提示 ... 437
20 Context State Queries … 439
20 上下文状态查询 ... 439

20.1 Simple Queries … 439
20.1 简单查询 ... 439

20.2 Pointer, String, and Related Context Queries … 441
20.2 指针、字符串及相关上下文查询...... 441

20.3 Internal Format Queries … 443
20.3 内部格式查询...... 443

20.3.1 Internal Format Query Parameters … 444
20.3.1 内部格式查询参数 ... 444

21 State Tables … 446
21 状态表 ... 446

A Invariance … 504 不变量...... 504
A. 1 Repeatability … 504
A.1 重复性 ... 504

A. 2 Multi-pass Algorithms … 505
A.2 多通道算法 ... 505

A. 3 Invariance Rules … 505
A.

A. 4 Tessellation Invariance … 507
A.4 细分不变性...... 507

A. 5 Atomic Counter Invariance … 509
A.5 原子计数器不变性...... 509

A. 6 What All This Means … 510
A.6 这一切意味着什么...... 510

B Corollaries … 511 B 推论...... 511
C Compressed Texture Image Formats … 513
C 压缩纹理图像格式 ... 513

C. 1 ASTC Compressed Texture Image Formats … 513
C.1 ASTC 压缩纹理图像格式...... 513

C. 2 ETC Compressed Texture Image Formats … 515
C.2 ETC 压缩纹理图像格式...... 515

D Version 3.0 and Before … 516
D 3.0 版及之前 ... 516

D. 1 New Features … 516
D.1 新功能 ... 516

D. 2 Change Log for 3.0.3 … 518
D.2 3.0.3 的更改日志 ... 518

D. 3 Change Log for 3.0.2 … 520
D.3.0.2 的更改日志 ... 520

D. 4 Change Log for 3.0.1 … 521
D.4 3.0.1 的更改日志 ... 521

D. 5 Credits and Acknowledgements … 523
D.

E Version 3.1 … 526
E 版本 3.1 ... 526

E. 1 New Features … 526
E.1 新功能 ... 526

E. 2 Change Log for Released Specifications … 527
E.

E. 3 Credits and Acknowledgements … 533
E.

F Version 3.2 … 536
F 版本 3.2 ... 536

F. 1 New Features … 536
F.1 新功能 ... 536

F. 2 Change Log Descriptions … 538
F.2 变更日志说明...... 538

F. 3 Change Log for Released Specifications … 538
F.

F. 4 Credits and Acknowledgements … 549
F.4 鸣谢 ... 549

G Backwards Compatibility … 551
G 向后兼容性 ... 551

G. 1 Legacy Features … 551
G. 1 传统功能 ... 551

G. 2 Differences in Runtime Behavior … 552
G. 2 运行时行为的差异...... 552

Index … 553 索引 ... 553

List of Figures 图表目录

3.1 Block diagram of the OpenGL ES pipeline. … 31
3.1 OpenGL ES 管道框图... 31

8.1 Transfer of pixel rectangles. … 146
8.1 像素矩形的传输.... 146

8.2 Selecting a subimage from an image … 152
8.2 从图像中选择子图像 ... 152

8.3 UNSIGNED_SHORT formats … 154
8.3 UNSIGNED_SHORT 格式 ... 154

8.4 UNSIGNED_INT formats … 155
8.4 UNSIGNED_INT 格式 ... 155

8.5 FLOAT_UNSIGNED_INT formats … 155
8.5 FLOAT_UNSIGNED_INT 格式 ... 155

8.6 A texture image and the coordinates used to access it. … 167
8.6 纹理图像及其访问坐标... 167

8.7 Example of the components returned for textureGather. … 199
8.7 文本采集返回的组件示例。... 199

10.1 Vertex processing and primitive assembly. … 256
10.1 顶点处理和基元装配... 256

10.2 Triangle strips, fans, and independent triangles. … 259
10.2 三角形条、扇形和独立三角形。... 259

10.3 Lines with adjacency. … 260
10.3 具有邻接关系的线条。... 260

10.4 Triangles with adjacency. … 260
10.4 有邻接关系的三角形.... 260

10.5 Triangle strips with adjacency. … 262
10.5 具有相邻关系的三角形条带.... 262

10.6 Packed component layout … 274
11.1 Domain parameterization for tessellation. … 314
11.1 细分领域参数化... 314

11.2 Inner triangle tessellation. … 318
11.2 内三角形细分... 318

11.3 Inner quad tessellation. … 320
11.3 内部四边形细分... 320

11.4 Isoline tessellation. … 322
11.4 Isoline tessellation.... 322

13.1 Rasterization … 350 13.1 光栅化 ... 350
13.2 Visualization of Bresenham’s algorithm. … 358
13.2 布列瑟纳姆算法的可视化.... 358

13.3 Rasterization of wide lines. … 360
13.3 宽线的光栅化 .... 360

13.4 The region used in rasterizing a multisampled line segment. … 362
13.4 对多采样线段进行栅格化时使用的区域。... 362

15.1 Per-fragment operations. … 379
15.1 每片段操作 .... 379

16.1 Operation of ReadPixels. … 406
16.1 操作 ReadPixels.... 406

List of Tables 表格清单

2.1 GL command suffixes … 9
2.1 GL 命令后缀 ... 9

2.2 GL data types … 11
2.2 GL 数据类型 ... 11

2.3 Summary of GL errors … 15
4.1 Initial properties of a sync object created with FenceSync. … 34
4.1 使用 FenceSync 创建的同步对象的初始属性。... 34

4.2 Asynchronous query targets … 39
4.2 异步查询目标...... 39

6.1 Buffer object binding targets. … 52
6.1 缓冲区对象绑定目标 .... 52

6.2 Buffer object parameters and their values. … 52
6.2 缓冲区对象参数及其值... 52

6.3 Buffer object initial state. … 55
6.3 缓冲区对象的初始状态 .... 55

6.4 Buffer object state set by MapBufferRange. … 58
6.4 由 MapBufferRange 设置的缓冲区对象状态。... 58

6.5 Indexed buffer object limits and binding queries … 64
7.1 CreateShader type values and the corresponding shader stages. … 68
7.1 CreateShader 类型值和相应的着色器阶段... 68

7.2 GetProgramResourceiv properties and supported interfaces … 87
7.3 OpenGL ES Shading Language type tokens … 92
7.4 Query targets for default uniform block storage, in components. … 103
7.4 默认统一块存储的查询目标(以组件为单位... 103

7.5 Query targets for combined uniform block storage, in components. … 104
7.5 以组件为单位的组合式统一块存储的查询目标... 104

7.6 GetProgramResourceiv properties used by GetActiveUniformsiv … 107
7.6 GetActiveUniformsiv 使用的 GetProgramResourceiv 属性...... 107

7.7 GetProgramResourceiv properties used by GetActiveUniform-
7.7 GetActiveUniform- 使用的 GetProgramResourceiv 属性

Blockiv. … 108 Blockiv.... 108
8.1 PixelStorei parameters … 145
8.1 PixelStorei 参数 ... 145

8.2 Valid combinations of format, type, and sized internalformat. … 148
8.2 格式、类型和有尺寸的内部格式的有效组合... 148

8.3 Valid combinations of format, type, and unsized internalformat. … 149
8.3 格式、类型和非大小内部格式的有效组合.... 149

8.4 Pixel data types. … 150
8.4 像素数据类型... 150

8.5 Pixel data formats. … 151
8.5 像素数据格式 .... 151

8.6 Packed pixel formats. … 154
8.6 打包像素格式... 154

8.7 Packed pixel field assignments … 156
8.8 Conversion from RGBA, depth, and stencil pixel components to
8.8 将 RGBA、深度和模板像素分量转换为

internal texture components. … 159
内部纹理组件。... 159

8.9 Effective internal format … 160
8.9 有效的内部格式...... 160

8.10 Sized internal color formats. … 163
8.10 大小内部颜色格式。... 163

8.11 Sized internal depth and stencil formats. … 164
8.11 大小内部深度和钢网格式。... 164

8.12 ReadPixels format and type used during CopyTex*. … 169
8.12 CopyTex* 时使用的 ReadPixels 格式和类型。... 169

8.13 Valid CopyTexImage source framebuffer/destination texture base
8.13 有效的 CopyTexImage 源帧缓冲/目标纹理基底

internal format combinations. … 170
内部格式组合。... 170

8.14 Effective internal format corresponding to floating-point framebuffers … 171
8.15 Effective internal format corresponding to destination internalfor-
8.15 与目的地内部格式相对应的有效内部格式

mat and linear source buffer component sizes. … 172
矩阵和线性源缓冲区组件大小。... 172

8.16 Effective internal format corresponding to destination internalfor-
8.16 与目的地内部格式相对应的有效内部格式

mat and sRGB source buffer component sizes. … 172
mat 和 sRGB 源缓冲区分量大小。... 172

8.17 Compressed internal formats. … 179
8.17 压缩内部格式... 179

8.18 Internal formats for buffer textures … 187
8.19 Texture parameters and their values. … 189
8.19 纹理参数及其值。... 189

8.20 Selection of cube map images. … 194
8.20 选择立方体地图图像。... 194

8.21 Texel location wrap mode application. … 198
8.21 德瑟耳位置包裹模式应用... 198

8.22 Depth texture comparison functions. … 213
8.22 深度纹理比较函数 .... 213

8.23 sRGB texture internal formats. … 214
8.23 sRGB 纹理内部格式。... 214

8.24 Layer numbers for cube map texture faces. … 216
8.24 立方体贴图纹理面的图层编号。... 216

8.25 Mapping of image load, store and atomic texel coordinate compo-
8.25 图像加载、存储和原子色元坐标组合映射

nents to texel numbers. … 217
的内容。... 217

8.26 Supported image unit formats, with equivalent format layout qual-
8.26 支持的图像单元格式及等效格式布局限定-- 8.27 支持的图像单元格式及等效格式布局限定

ifiers. … 219 ifiers。... 219
8.27 Texel sizes, compatibility classes, and pixel format/type combina-
8.27 Texel 尺寸、兼容性等级和像素格式/类型组合

tions for each image format. … 221
每种图像格式的选项。... 221

9.1 Framebuffer attachment points. … 239
9.1 帧缓冲器连接点 .... 239

10.1 Triangles generated by triangle strips with adjacency. … 263
10.1 有邻接关系的三角形条所生成的三角形.... 263

10.2 Alternative ordering to triangles generated by triangle strips with
10.2 三角形条产生的三角形的另一种排序方式,带

adjacency (see table 10.1). … 264
相邻关系(见表 10.1)。... 264

10.3 Vertex array sizes (values per vertex) and data types for generic
10.3 顶点数组大小(每个顶点的数值)和通用

vertex attributes. … 268 顶点属性。... 268
10.4 Indirect commands and corresponding indirect buffer targets. … 276
10.4 间接命令及相应的间接缓冲区目标 .... 276

11.1 Generic attribute components accessed by attribute variables. … 289
11.1 通过属性变量访问的通用属性组件.... 289

11.2 Generic attributes and vector types used by column vectors of ma-
11.2 矩阵列向量使用的通用属性和向量类型

trix variables bound to generic attribute index i i ii. … 290
绑定到通用属性索引 i i ii 的 trix 变量。... 290

11.3 Scalar and vector vertex attribute types … 290
12.1 Transform feedback modes … 340
12.1 转换反馈模式 ... 340

12.2 Output types for OpenGL ES Shading Language variables … 342
12.2 OpenGL ES着色语言变量的输出类型... 342

12.3 Provoking vertex selection. … 345
12.3 挑动顶点选择 .... 345

14.1 Correspondence of filtered texture components to texture base
14.1 滤波纹理成分与纹理基底的对应关系

components … 374 组件 ... 374
15.1 RGB and alpha blend equations. … 387
15.1 RGB 和 Alpha 混合方程.... 387

15.2 Blending functions. … 388
15.2 混合函数... 388

15.3 Advanced Blend Equations … 391
15.3 高级混合方程...... 391

15.4 Hue-Saturation-Luminosity Advanced Blend Equations … 393
15.5 Buffer selection for a framebuffer object … 397
16.1 PixelStorei parameters. … 408
16.1 PixelStorei 参数。... 408

16.2 ReadPixels GL data types and reversed component conversion for-
16.2 读取像素的 GL 数据类型和反向分量转换

mulas. … 411 唢呐... 411
16.3 Compatible internal formats for copying … 417
16.3 兼容的内部复制格式 ... 417

16.4 Compatible internal formats for CopyImageSubData … 419
16.4 CopyImageSubData 的兼容内部格式... 419

18.1 Sources of debug output messages … 425
18.1 调试输出消息的来源 ... 425

18.2 Types of debug output messages … 426
18.3 Severity levels of messages … 426
18.3 报文的严重程度...... 426

18.4 Object namespace identifiers … 432
18.4 对象命名空间标识符...... 432

19.1 Hint targets and descriptions … 437
19.1 提示目标和说明...... 437

20.1 Internal format targets … 443
20.1 内部格式目标...... 443

21.1 State Variable Types … 447
21.1 状态变量类型... 447

21.2 Current Values and Associated Data … 448
21.2 当前值和相关数据...... 448

21.3 Vertex Array Object State … 449
21.3 顶点阵列对象状态... 449

21.4 Vertex Array Data (not in vertex array objects) … 450
21.4 顶点阵列数据(不在顶点阵列对象中)... 450

21.5 Buffer Object State … 451
21.5 缓冲对象状态...... 451

21.6 Transformation State … 452
21.7 Rasterization … 453 21.7 光栅化 ... 453
21.8 Multisampling … 454 21.8 多重取样 ... 454
21.9 Textures (selector, state per texture unit) … 455
21.9 纹理(选择器,每个纹理单元的状态)...... 455

21.10Textures (state per texture object) … 456
21.10 纹理(每个纹理对象的状态)... 456

21.11Textures (state per texture image) … 457
21.11 纹理(每个纹理图像的状态)... 457

21.12Textures (state per sampler object) … 458
21.13Pixel Operations … 459
21.13 像素操作 ... 459

21.14Framebuffer Control … 460
21.15Framebuffer (state per framebuffer object) … 461
21.15Framebuffer (每个帧缓冲器对象的状态)... 461

21.16Framebuffer (state per attachment point) … 462
21.16Framebuffer (每个连接点的状态)... 462

21.17Renderbuffer (state per renderbuffer object) … 463
21.17 渲染缓冲区(每个渲染缓冲区对象的状态)... 463

21.18Pixels … 464 21.18 像素 ... 464
21.19Shader Object State … 465
21.19 着色器对象状态 ... 465

21.20Program Pipeline Object State … 466
21.20 程序管道对象状态... 466

21.21 Program Object State … 467
21.21 程序对象状态 ... 467

21.22Program Object State (cont.) … 468
21.22 程序对象状态(续) 468

21.23Program Object State (cont.) … 469
21.23 程序对象状态(续)... 469

21.24Program Object State (cont.) … 470
21.24 程序对象状态(续)...... 470

21.25Program Object State (cont.) … 471
21.25 程序对象状态(续)...... 471

21.26Program Object State (cont.) … 472
21.26 程序对象状态(续)... 472

21.27 Program Interface State … 473
21.28Program Object Resource State … 474
21.28 程序对象资源状态...... 474

21.29Program Object Resource State (cont.) … 475
21.29 程序对象资源状态(续)...... 475

21.30Vertex Shader State (not part of program objects) … 476
21.30 顶点着色器状态(不属于程序对象)...... 476

21.31Query Object State … 477
21.31 查询对象状态 ... 477

21.32Atomic Counter Buffer Binding State … 478
21.33Image State (state per image unit) … 479
21.33 图像状态(每个图像单元的状态)...... 479

21.34Shader Storage Buffer Binding State … 480
21.34 着色器存储缓冲区绑定状态 ... 480

21.35Transform Feedback State … 481
21.35 转换反馈状态 ... 481

21.36Uniform Buffer Binding State … 482
21.36 统一缓冲区绑定状态...... 482

21.37Sync (state per sync object) … 483
21.37 同步(每个同步对象的状态)...... 483

21.38 Hints … 484 21.38 提示...... 484
21.39Compute Dispatch State … 485
21.39 计算调度状态 ... 485

21.40Implementation Dependent Values … 486
21.41Implementation Dependent Values … (cont.)
21.41 实施依赖值......(续)

\dagger These queries return the maximum no. of samples for all internal
\dagger 这些查询返回所有内部样本的最大数量。

formats required to support multisampled rendering.
支持多采样渲染所需的格式。

‡“ULP” means “Units in the Last Place” or “Unit of Least Precision”. … 487
‡"ULP "指 "末位单位 "或 "精度最低单位"。... 487

21.42Implementation Dependent Values (cont.) … 488
21.42 实施依赖值(续)...... 488

21.43Implementation Dependent Version and Extension Support … 489
21.44Implementation Dependent Vertex Shader Limits … 490
21.45Implementation Dependent Tessellation Shader Limits … 491
21.46Implementation Dependent Tessellation Shader Limits (cont.) … 492
21.47Implementation Dependent Geometry Shader Limits … 493
21.48Implementation Dependent Fragment Shader Limits . … 494
21.48 与实施相关的片段着色器限制 .... 494

21.49Implementation Dependent Compute Shader Limits … 495
21.50Implementation Dependent Aggregate Shader Limits … 496
21.51 Implementation Dependent Aggregate Shader Limits (cont.) … 497
21.52 Implementation Dependent Aggregate Shader Limits (cont.) … 498
21.53Debug Output State … 499
21.53 调试输出状态 ... 499

21.54Implementation Dependent Debug Output State … 500
21.54 实施取决于调试输出状态 ... 500

21.55Implementation Dependent Transform Feedback Limits … 501
21.55 实施取决于变换反馈限制..............501

21.56Framebuffer Dependent Values … 502
21.57Miscellaneous … 503 21.57 杂项 ... 503
C. 1 Mapping of OpenGL ES ASTC formats to descriptions. … 514
C.1 OpenGL ES ASTC 格式与描述的映射。... 514

C. 2 Mapping of OpenGL ES ETC formats to descriptions. … 515
C.2 OpenGL ES ETC 格式与描述的映射。... 515