logo资料库

OpenGL ES 3.1 spec.pdf

第1页 / 共494页
第2页 / 共494页
第3页 / 共494页
第4页 / 共494页
第5页 / 共494页
第6页 / 共494页
第7页 / 共494页
第8页 / 共494页
资料共494页,剩余部分请下载后查看
1 Introduction
1.1 Formatting of the OpenGL ES Specification
1.2 What is the OpenGL ES Graphics System?
1.3 Programmer's View of OpenGL ES
1.4 Implementor's View of OpenGL ES
1.5 Our View
1.6 Related APIs
1.6.1 OpenGL ES Shading Language
1.6.2 WebGL
1.6.3 Window System Bindings
1.6.4 OpenCL
1.7 Filing Bug Reports
2 OpenGL ES Fundamentals
2.1 OpenGL ES Fundamentals
2.2 Command Syntax
2.2.1 Data Conversion For State-Setting Commands
2.2.2 Data Conversions For State Query Commands
2.3 Command Execution
2.3.1 Errors
2.3.2 Flush and Finish
2.3.3 Numeric Representation and Computation
2.3.4 Fixed-Point Data Conversions
2.4 Rendering Commands
2.5 Context State
2.5.1 Generic Context State Queries
2.6 Objects and the Object Model
2.6.1 Object Management
2.6.2 Buffer Objects
2.6.3 Shader Objects
2.6.4 Program Objects
2.6.5 Program Pipeline Objects
2.6.6 Texture Objects
2.6.7 Sampler Objects
2.6.8 Renderbuffer Objects
2.6.9 Framebuffer Objects
2.6.10 Vertex Array Objects
2.6.11 Transform Feedback Objects
2.6.12 Query Objects
2.6.13 Sync Objects
3 Dataflow Model
4 Event Model
4.1 Sync Objects and Fences
4.1.1 Waiting for Sync Objects
4.1.2 Signaling
4.1.3 Sync Object Queries
4.2 Query Objects and Asynchronous Queries
4.2.1 Query Object Queries
5 Shared Objects and Multiple Contexts
5.1 Object Deletion Behavior
5.1.1 Side Effects of Shared Context Destruction
5.1.2 Automatic Unbinding of Deleted Objects
5.1.3 Deleted Object and Object Name Lifetimes
5.2 Sync Objects and Multiple Contexts
5.3 Propagating Changes to Objects
5.3.1 Determining Completion of Changes to an object
5.3.2 Definitions
5.3.3 Rules
6 Buffer Objects
6.1 Creating and Binding Buffer Objects
6.1.1 Binding Buffer Objects to Indexed Targets
6.2 Creating and Modifying Buffer Object Data Stores
6.3 Mapping and Unmapping Buffer Data
6.3.1 Unmapping Buffers
6.3.2 Effects of Mapping Buffers on Other GL Commands
6.4 Effects of Accessing Outside Buffer Bounds
6.5 Copying Between Buffers
6.6 Buffer Object Queries
6.6.1 Indexed Buffer Object Limits and Binding Queries
6.7 Buffer Object State
7 Programs and Shaders
7.1 Shader Objects
7.2 Shader Binaries
7.3 Program Objects
7.3.1 Program Interfaces
7.4 Program Pipeline Objects
7.4.1 Shader Interface Matching
7.4.2 Program Pipeline Object State
7.5 Program Binaries
7.6 Uniform Variables
7.6.1 Loading Uniform Variables In The Default Uniform Block
7.6.2 Uniform Blocks
7.6.3 Uniform Buffer Object Bindings
7.7 Atomic Counter Buffers
7.7.1 Atomic Counter Buffer Object Storage
7.7.2 Atomic Counter Buffer Bindings
7.8 Shader Buffer Variables and Shader Storage Blocks
7.9 Samplers
7.10 Images
7.11 Shader Memory Access
7.11.1 Shader Memory Access Ordering
7.11.2 Shader Memory Access Synchronization
7.12 Shader, Program, and Program Pipeline Queries
7.13 Required State
8 Textures and Samplers
8.1 Texture Objects
8.2 Sampler Objects
8.3 Sampler Object Queries
8.4 Pixel Rectangles
8.4.1 Pixel Storage Modes and Pixel Buffer Objects
8.4.2 Transfer of Pixel Rectangles
8.5 Texture Image Specification
8.5.1 Required Texture Formats
8.5.2 Encoding of Special Internal Formats
8.5.3 Texture Image Structure
8.6 Alternate Texture Image Specification Commands
8.6.1 Texture Copying Feedback Loops
8.7 Compressed Texture Images
8.8 Multisample Textures
8.9 Texture Parameters
8.10 Texture Queries
8.10.1 Active Texture
8.10.2 Texture Parameter Queries
8.10.3 Texture Level Parameter Queries
8.11 Depth Component Textures
8.12 Cube Map Texture Selection
8.12.1 Seamless Cube Map Filtering
8.13 Texture Minification
8.13.1 Scale Factor and Level of Detail
8.13.2 Coordinate Wrapping and Texel Selection
8.13.3 Mipmapping
8.13.4 Manual Mipmap Generation
8.14 Texture Magnification
8.15 Combined Depth/Stencil Textures
8.16 Texture Completeness
8.16.1 Effects of Sampler Objects on Texture Completeness
8.16.2 Effects of Completeness on Texture Application
8.16.3 Effects of Completeness on Texture Image Specification
8.17 Immutable-Format Texture Images
8.18 Texture State
8.19 Texture Comparison Modes
8.19.1 Depth Texture Comparison Mode
8.20 sRGB Texture Color Conversion
8.21 Shared Exponent Texture Color Conversion
8.22 Texture Image Loads and Stores
8.22.1 Image Unit Queries
9 Framebuffers and Framebuffer Objects
9.1 Framebuffer Overview
9.2 Binding and Managing Framebuffer Objects
9.2.1 Framebuffer Object Parameters
9.2.2 Attaching Images to Framebuffer Objects
9.2.3 Framebuffer Object Queries
9.2.4 Renderbuffer Objects
9.2.5 Required Renderbuffer Formats
9.2.6 Renderbuffer Object Queries
9.2.7 Attaching Renderbuffer Images to a Framebuffer
9.2.8 Attaching Texture Images to a Framebuffer
9.3 Feedback Loops Between Textures and the Framebuffer
9.3.1 Rendering Feedback Loops
9.3.2 Texture Copying Feedback Loops
9.4 Framebuffer Completeness
9.4.1 Framebuffer Attachment Completeness
9.4.2 Whole Framebuffer Completeness
9.4.3 Required Framebuffer Formats
9.4.4 Effects of Framebuffer Completeness on Framebuffer Operations
9.4.5 Effects of Framebuffer State on Framebuffer Dependent Values
9.5 Mapping between Pixel and Element in Attached Image
9.6 Conversion to Framebuffer-Attachable Image Components
9.7 Conversion to RGBA Values
10 Vertex Specification and Drawing Commands
10.1 Primitive Types
10.1.1 Points
10.1.2 Line Strips
10.1.3 Line Loops
10.1.4 Separate Lines
10.1.5 Triangle Strips
10.1.6 Triangle Fans
10.1.7 Separate Triangles
10.1.8 General Considerations For Polygon Primitives
10.2 Current Vertex Attribute Values
10.2.1 Current Generic Attributes
10.2.2 Vertex Attribute Queries
10.2.3 Required State
10.3 Vertex Arrays
10.3.1 Specifying Arrays for Generic Vertex Attributes
10.3.2 Vertex Attribute Divisors
10.3.3 Transferring Array Elements
10.3.4 Primitive Restart
10.3.5 Packed Vertex Data Formats
10.3.6 Vertex Arrays in Buffer Objects
10.3.7 Array Indices in Buffer Objects
10.3.8 Indirect Commands in Buffer Objects
10.4 Vertex Array Objects
10.5 Drawing Commands Using Vertex Arrays
10.6 Vertex Array and Vertex Array Object Queries
10.7 Required State
11 Programmable Vertex Processing
11.1 Vertex Shaders
11.1.1 Vertex Attributes
11.1.2 Vertex Shader Variables
11.1.3 Shader Execution
12 Fixed-Function Vertex Post-Processing
12.1 Transform Feedback
12.1.1 Transform Feedback Objects
12.1.2 Transform Feedback Primitive Capture
12.2 Primitive Queries
12.3 Flatshading
12.4 Primitive Clipping
12.4.1 Clipping Shader Outputs
12.5 Coordinate Transformations
12.5.1 Controlling the Viewport
13 Fixed-Function Primitive Assembly and Rasterization
13.1 Discarding Primitives Before Rasterization
13.2 Invariance
13.2.1 Multisampling
13.3 Points
13.3.1 Basic Point Rasterization
13.3.2 Point Multisample Rasterization
13.4 Line Segments
13.4.1 Basic Line Segment Rasterization
13.4.2 Other Line Segment Features
13.4.3 Line Rasterization State
13.4.4 Line Multisample Rasterization
13.5 Polygons
13.5.1 Basic Polygon Rasterization
13.5.2 Depth Offset
13.5.3 Polygon Multisample Rasterization
13.5.4 Polygon Rasterization State
13.6 Early Per-Fragment Tests
14 Programmable Fragment Processing
14.1 Fragment Shader Variables
14.2 Shader Execution
14.2.1 Texture Access
14.2.2 Shader Inputs
14.2.3 Shader Outputs
14.2.4 Early Fragment Tests
15 Writing Fragments and Samples to the Framebuffer
15.1 Per-Fragment Operations
15.1.1 Pixel Ownership Test
15.1.2 Scissor Test
15.1.3 Multisample Fragment Operations
15.1.4 Stencil Test
15.1.5 Depth Buffer Test
15.1.6 Occlusion Queries
15.1.7 Blending
15.1.8 sRGB Conversion
15.1.9 Dithering
15.1.10 Additional Multisample Fragment Operations
15.2 Whole Framebuffer Operations
15.2.1 Selecting Buffers for Writing
15.2.2 Fine Control of Buffer Updates
15.2.3 Clearing the Buffers
15.2.4 Invalidating Framebuffer Contents
16 Reading and Copying Pixels
16.1 Reading Pixels
16.1.1 Selecting Buffers for Reading
16.1.2 ReadPixels
16.1.3 Obtaining Pixels from the Framebuffer
16.1.4 Conversion of RGBA values
16.1.5 Final Conversion
16.1.6 Placement in Pixel Pack Buffer or Client Memory
16.2 Copying Pixels
16.2.1 Blitting Pixel Rectangles
16.3 Pixel Draw and Read State
17 Compute Shaders
17.1 Compute Shader Variables
18 Special Functions
18.1 Hints
19 Context State Queries
19.1 Simple Queries
19.2 String Queries
19.3 Internal Format Queries
19.3.1 Internal Format Queries
20 State Tables
20.2 Vertex Array Object State
20.3 Vertex Array Data (not in vertex array objects)
20.4 Buffer Object State
20.5 Transformation State
20.6 Rasterization
20.7 Multisampling
20.8 Textures (selector, state per texture unit)
20.9 Textures (state per texture object)
20.10 black Textures (state per texture image)
20.11 Textures (state per sampler object)
20.12 Pixel Operations
20.13 Framebuffer Control
20.14 Framebuffer (state per framebuffer object)
20.15 Framebuffer (state per attachment point)
20.16 Renderbuffer (state per renderbuffer object)
20.17 Pixels
20.18 Shader Object State
20.19 black Program Pipeline Object State
20.20 Program Object State
20.21 Program Object State (cont.)
20.22 Program Object State (cont.)
20.23 Program Object State (cont.)
20.24 Program Object State (cont.)
20.25 black Program Object State (cont.)
20.26 black Program Interface State
20.27 black Program Object Resource State
20.28 black Program Object Resource State (cont.)
20.29 Vertex Shader State (not part of program objects)
20.30 Query Object State
20.31 black Atomic Counter Buffer Binding State
20.32 black Image State (state per image unit)
20.33 black Shader Storage Buffer Binding State
20.34 Transform Feedback State
20.35 Uniform Buffer Binding State
20.36 Sync (state per sync object)
20.37 Hints
20.38 black Compute Dispatch State
20.39 Implementation Dependent Values
20.40 Implementation Dependent Values (cont.)
20.41 Implementation Dependent Values (cont.)
20.42 Implementation Dependent Version and Extension Support
20.43 Implementation Dependent Vertex Shader Limits
20.44 Implementation Dependent Fragment Shader Limits
20.45 black Implementation Dependent Compute Shader Limits
20.46 Implementation Dependent Aggregate Shader Limits
20.47 black Implementation Dependent Aggregate Shader Limits (cont.)
20.48 Implementation Dependent Transform Feedback Limits
20.49 Framebuffer Dependent Values
20.50 Miscellaneous
A Invariance
A.1 Repeatability
A.2 Multi-pass Algorithms
A.3 Invariance Rules
A.4 Atomic Counter Invariance
A.5 What All This Means
B Corollaries
C Compressed Texture Image Formats
C.1 ETC Compressed Texture Image Formats
C.1.1 Format COMPRESSED_RGB8_ETC2
C.1.2 Format COMPRESSED_SRGB8_ETC2
C.1.3 Format COMPRESSED_RGBA8_ETC2_EAC
C.1.4 Format COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
C.1.5 Format COMPRESSED_R11_EAC
C.1.6 Format COMPRESSED_RG11_EAC
C.1.7 Format COMPRESSED_SIGNED_R11_EAC
C.1.8 Format COMPRESSED_SIGNED_RG11_EAC
C.1.9 Format COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
C.1.10 Format COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
D Version 3.0 and Before
D.1 New Features
D.2 Change Log for 3.0.3
D.3 Change Log for 3.0.2
D.4 Change Log for 3.0.1
D.5 Credits and Acknowledgements
E Version 3.1
E.1 New Features
E.2 Change Log for Released Specifications
E.3 Credits and Acknowledgements
F Backwards Compatibility
F.1 Legacy Features
F.2 Differences in Runtime Behavior
OpenGL R ES Version 3.1 (March 17, 2014) Editor: Jon Leech
Copyright c 2006-2014 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, repub- lished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be re- formatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group web-site should be included whenever possible with specification distributions. Khronos Group makes no, and expressly disclaims any, representations or war- ranties, express or implied, regarding this specification, including, without limita- tion, any implied warranties of merchantability or fitness for a particular purpose or non-infringement of any intellectual property. Khronos Group makes no, and expressly disclaims any, warranties, express or implied, regarding the correctness, accuracy, completeness, timeliness, and reliability of the specification. Under no circumstances will the Khronos Group, or any of its Promoters, Contributors or Members or their respective partners, officers, directors, employees, agents or rep- resentatives be liable for any damages, whether direct, indirect, special or conse- quential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials. Khronos is a trademark of The Khronos Group Inc. OpenGL is a registered trade- mark, and OpenGL ES is a trademark, of Silicon Graphics International.
Contents 1 Introduction 1.1 Formatting of the OpenGL ES Specification . . . . . . . . . . . . 1.2 What is the OpenGL ES Graphics System? . . . . . . . . . . . . 1.3 Programmer’s View of OpenGL ES . . . . . . . . . . . . . . . . 1.4 Implementor’s View of OpenGL ES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Our View . 1.6 Related APIs . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.1 OpenGL ES Shading Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.2 WebGL . 1.6.3 Window System Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.4 OpenCL . 1.7 Filing Bug Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 OpenGL ES Fundamentals 2.3 Command Execution . 2.2.1 Data Conversion For State-Setting Commands 2.2.2 Data Conversions For State Query Commands 2.1 OpenGL ES Fundamentals . . . . . . . . . . . . . . . . . . . . . 2.2 Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Errors . 2.3.2 Flush and Finish . . . . . . . . . . . . . . . . . . . . . . 2.3.3 Numeric Representation and Computation . . . . . . . . . 2.3.4 Fixed-Point Data Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Generic Context State Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6.1 Object Management 2.6.2 Buffer Objects 2.4 Rendering Commands 2.5 Context State . 2.6 Objects and the Object Model . . 1 1 1 2 2 3 3 3 4 4 4 5 6 6 8 10 12 13 13 15 16 20 21 22 22 22 23 24 i
CONTENTS Sampler Objects Shader Objects . . . . . . . . . . . . . . . . . . . . . . . 2.6.3 Program Objects . . . . . . . . . . . . . . . . . . . . . . 2.6.4 2.6.5 Program Pipeline Objects . . . . . . . . . . . . . . . . . 2.6.6 Texture Objects . . . . . . . . . . . . . . . . . . . . . . . 2.6.7 . . . . . . . . . . . . . . . . . . . . . . 2.6.8 Renderbuffer Objects . . . . . . . . . . . . . . . . . . . . 2.6.9 Framebuffer Objects . . . . . . . . . . . . . . . . . . . . 2.6.10 Vertex Array Objects . . . . . . . . . . . . . . . . . . . . 2.6.11 Transform Feedback Objects . . . . . . . . . . . . . . . . 2.6.12 Query Objects . . . . . . . . . . . . . . . . . . . . . . . 2.6.13 Sync Objects . . . . . . . . . . . . . . . . . . . . . . . . 3 Dataflow Model 4 Event Model 4.1 Sync Objects and Fences . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Waiting for Sync Objects . . . . . . . . . . . . . . . . . . Signaling . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 4.1.3 Sync Object Queries . . . . . . . . . . . . . . . . . . . . 4.2 Query Objects and Asynchronous Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Query Object Queries 5 Shared Objects and Multiple Contexts 5.1 Object Deletion Behavior . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Side Effects of Shared Context Destruction . . . . . . . . 5.1.2 Automatic Unbinding of Deleted Objects . . . . . . . . . 5.1.3 Deleted Object and Object Name Lifetimes . . . . . . . . 5.2 Sync Objects and Multiple Contexts . . . . . . . . . . . . . . . . 5.3 Propagating Changes to Objects . . . . . . . . . . . . . . . . . . 5.3.1 Determining Completion of Changes to an object . . . . . 5.3.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.3 Rules . 6 Buffer Objects 6.1 Creating and Binding Buffer Objects . . . . . . . . . . . . . . . . 6.1.1 Binding Buffer Objects to Indexed Targets . . . . . . . . . 6.2 Creating and Modifying Buffer Object Data Stores . . . . . . . . 6.3 Mapping and Unmapping Buffer Data . . . . . . . . . . . . . . . 6.3.1 Unmapping Buffers . . . . . . . . . . . . . . . . . . . . . 6.3.2 Effects of Mapping Buffers on Other GL Commands . . . ii 24 25 25 25 25 26 26 26 26 27 27 28 30 30 32 34 35 36 39 41 41 41 42 42 43 43 44 44 45 47 48 50 51 54 57 57 OpenGL ES 3.1 (March 17, 2014)
CONTENTS 6.4 Effects of Accessing Outside Buffer Bounds . . . . . . . . . . . . 6.5 Copying Between Buffers . . . . . . . . . . . . . . . . . . . . . . 6.6 Buffer Object Queries . . . . . . . . . . . . . . . . . . . . . . . . Indexed Buffer Object Limits and Binding Queries . . . . 6.7 Buffer Object State . . . . . . . . . . . . . . . . . . . . . . . . . 6.6.1 iii 58 58 59 60 62 7.3.1 7.4.1 7.4.2 7 Programs and Shaders . 7.1 Shader Objects 7.2 Shader Binaries . 7.3 Program Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Program Interfaces . . . . . . . . . . . . . . . . . . . . . 7.4 Program Pipeline Objects . . . . . . . . . . . . . . . . . . . . . . Shader Interface Matching . . . . . . . . . . . . . . . . . Program Pipeline Object State . . . . . . . . . . . . . . . 7.5 Program Binaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6 Uniform Variables . 63 64 67 68 75 87 91 92 93 95 7.6.1 Loading Uniform Variables In The Default Uniform Block 101 7.6.2 Uniform Blocks . . . . . . . . . . . . . . . . . . . . . . . 104 7.6.3 Uniform Buffer Object Bindings . . . . . . . . . . . . . . 107 7.7 Atomic Counter Buffers . . . . . . . . . . . . . . . . . . . . . . . 108 7.7.1 Atomic Counter Buffer Object Storage . . . . . . . . . . 109 7.7.2 Atomic Counter Buffer Bindings . . . . . . . . . . . . . . 109 7.8 Shader Buffer Variables and Shader Storage Blocks . . . . . . . . 109 . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.9 Samplers 7.10 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.11 Shader Memory Access . . . . . . . . . . . . . . . . . . . . . . . 112 7.11.1 Shader Memory Access Ordering . . . . . . . . . . . . . 113 7.11.2 Shader Memory Access Synchronization . . . . . . . . . 114 7.12 Shader, Program, and Program Pipeline Queries . . . . . . . . . . 119 7.13 Required State . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 . . . . . . . . . . 128 8 Textures and Samplers . . . . . . . . . . . . . . . . . . . . . . . . . . 129 8.1 Texture Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 8.2 Sampler Objects . 8.3 Sampler Object Queries . . . . . . . . . . . . . . . . . . . . . . . 134 8.4 Pixel Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 8.4.1 Pixel Storage Modes and Pixel Buffer Objects . . . . . . . 135 8.4.2 Transfer of Pixel Rectangles . . . . . . . . . . . . . . . . 136 8.5 Texture Image Specification . . . . . . . . . . . . . . . . . . . . 147 . . . . . . . . . . . . . . . . . 149 8.5.1 Required Texture Formats OpenGL ES 3.1 (March 17, 2014)
CONTENTS iv 8.5.2 Encoding of Special Internal Formats . . . . . . . . . . . 150 8.5.3 Texture Image Structure . . . . . . . . . . . . . . . . . . 153 8.6 Alternate Texture Image Specification Commands . . . . . . . . . 156 8.6.1 Texture Copying Feedback Loops . . . . . . . . . . . . . 164 8.7 Compressed Texture Images . . . . . . . . . . . . . . . . . . . . 164 8.8 Multisample Textures . . . . . . . . . . . . . . . . . . . . . . . . 168 8.9 Texture Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 170 8.10 Texture Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 8.10.1 Active Texture . . . . . . . . . . . . . . . . . . . . . . . 172 8.10.2 Texture Parameter Queries . . . . . . . . . . . . . . . . . 172 8.10.3 Texture Level Parameter Queries . . . . . . . . . . . . . . 173 8.11 Depth Component Textures . . . . . . . . . . . . . . . . . . . . . 174 8.12 Cube Map Texture Selection . . . . . . . . . . . . . . . . . . . . 174 8.12.1 Seamless Cube Map Filtering . . . . . . . . . . . . . . . 175 8.13 Texture Minification . . . . . . . . . . . . . . . . . . . . . . . . 176 8.13.1 Scale Factor and Level of Detail . . . . . . . . . . . . . . 176 8.13.2 Coordinate Wrapping and Texel Selection . . . . . . . . . 178 8.13.3 Mipmapping . . . . . . . . . . . . . . . . . . . . . . . . 182 8.13.4 Manual Mipmap Generation . . . . . . . . . . . . . . . . 184 8.14 Texture Magnification . . . . . . . . . . . . . . . . . . . . . . . . 185 8.15 Combined Depth/Stencil Textures . . . . . . . . . . . . . . . . . 185 8.16 Texture Completeness . . . . . . . . . . . . . . . . . . . . . . . . 185 8.16.1 Effects of Sampler Objects on Texture Completeness . . . 186 8.16.2 Effects of Completeness on Texture Application . . . . . . 187 8.16.3 Effects of Completeness on Texture Image Specification . 187 8.17 Immutable-Format Texture Images . . . . . . . . . . . . . . . . . 187 8.18 Texture State . . . . . . . . . . . . . . . . . . . . . . . . . . 191 8.19 Texture Comparison Modes . . . . . . . . . . . . . . . . . . . . . 192 8.19.1 Depth Texture Comparison Mode . . . . . . . . . . . . . 192 8.20 sRGB Texture Color Conversion . . . . . . . . . . . . . . . . . . 193 8.21 Shared Exponent Texture Color Conversion . . . . . . . . . . . . 194 8.22 Texture Image Loads and Stores . . . . . . . . . . . . . . . . . . 194 8.22.1 Image Unit Queries . . . . . . . . . . . . . . . . . . . . . 200 . . 9 Framebuffers and Framebuffer Objects 201 9.1 Framebuffer Overview . . . . . . . . . . . . . . . . . . . . . . . 201 9.2 Binding and Managing Framebuffer Objects . . . . . . . . . . . . 203 9.2.1 . . . . . . . . . . . . . . 206 9.2.2 Attaching Images to Framebuffer Objects . . . . . . . . . 207 9.2.3 Framebuffer Object Queries . . . . . . . . . . . . . . . . 208 Framebuffer Object Parameters OpenGL ES 3.1 (March 17, 2014)
CONTENTS v 9.2.4 Renderbuffer Objects . . . . . . . . . . . . . . . . . . . . 211 9.2.5 Required Renderbuffer Formats . . . . . . . . . . . . . . 214 9.2.6 Renderbuffer Object Queries . . . . . . . . . . . . . . . . 214 9.2.7 Attaching Renderbuffer Images to a Framebuffer . . . . . 215 . . . . . . . . 217 9.2.8 Attaching Texture Images to a Framebuffer 9.3 Feedback Loops Between Textures and the Framebuffer . . . . . . 220 9.3.1 Rendering Feedback Loops . . . . . . . . . . . . . . . . . 220 9.3.2 Texture Copying Feedback Loops . . . . . . . . . . . . . 221 9.4 Framebuffer Completeness . . . . . . . . . . . . . . . . . . . . . 222 9.4.1 Framebuffer Attachment Completeness . . . . . . . . . . 223 9.4.2 Whole Framebuffer Completeness . . . . . . . . . . . . . 224 9.4.3 Required Framebuffer Formats . . . . . . . . . . . . . . . 227 9.4.4 Effects of Framebuffer Completeness on Framebuffer Op- erations . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 9.4.5 Effects of Framebuffer State on Framebuffer Dependent . Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 9.5 Mapping between Pixel and Element in Attached Image . . . . . . 228 9.6 Conversion to Framebuffer-Attachable Image Components . . . . 229 9.7 Conversion to RGBA Values . . . . . . . . . . . . . . . . . . . . 229 10 Vertex Specification and Drawing Commands 230 . . . . . . . . . . . . . . . . . . . . . . . . . . 232 10.1 Primitive Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 10.1.1 Points . . 10.1.2 Line Strips . . . . . . . . . . . . . . . . . . . . . . . . . 232 10.1.3 Line Loops . . . . . . . . . . . . . . . . . . . . . . . . . 232 10.1.4 Separate Lines . . . . . . . . . . . . . . . . . . . . . . . 232 10.1.5 Triangle Strips . . . . . . . . . . . . . . . . . . . . . . . 233 10.1.6 Triangle Fans . . . . . . . . . . . . . . . . . . . . . . . . 234 10.1.7 Separate Triangles . . . . . . . . . . . . . . . . . . . . . 234 10.1.8 General Considerations For Polygon Primitives . . . . . . 234 10.2 Current Vertex Attribute Values . . . . . . . . . . . . . . . . . . . 234 10.2.1 Current Generic Attributes . . . . . . . . . . . . . . . . . 234 10.2.2 Vertex Attribute Queries . . . . . . . . . . . . . . . . . . 236 10.2.3 Required State . . . . . . . . . . . . . . . . . . . . . . . 236 . . . . . . . . . . . . . . . . . . . . . . . . . . 236 10.3.1 Specifying Arrays for Generic Vertex Attributes . . . . . . 236 10.3.2 Vertex Attribute Divisors . . . . . . . . . . . . . . . . . . 241 10.3.3 Transferring Array Elements . . . . . . . . . . . . . . . . 242 10.3.4 Primitive Restart . . . . . . . . . . . . . . . . . . . . . . 242 10.3.5 Packed Vertex Data Formats . . . . . . . . . . . . . . . . 243 10.3 Vertex Arrays . . OpenGL ES 3.1 (March 17, 2014)
CONTENTS vi 10.3.6 Vertex Arrays in Buffer Objects . . . . . . . . . . . . . . 243 10.3.7 Array Indices in Buffer Objects . . . . . . . . . . . . . . 244 10.3.8 Indirect Commands in Buffer Objects . . . . . . . . . . . 244 10.4 Vertex Array Objects . . . . . . . . . . . . . . . . . . . . . . . . 245 10.5 Drawing Commands Using Vertex Arrays . . . . . . . . . . . . . 247 10.6 Vertex Array and Vertex Array Object Queries . . . . . . . . . . . 253 10.7 Required State . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 . 11.1 Vertex Shaders 11 Programmable Vertex Processing . 256 . . . . . . . . . . . . . . . . . . . . . . . . . . 256 11.1.1 Vertex Attributes . . . . . . . . . . . . . . . . . . . . . . 256 11.1.2 Vertex Shader Variables . . . . . . . . . . . . . . . . . . 261 11.1.3 Shader Execution . . . . . . . . . . . . . . . . . . . . . . 264 12 Fixed-Function Vertex Post-Processing 273 12.1 Transform Feedback . . . . . . . . . . . . . . . . . . . . . . . . 273 12.1.1 Transform Feedback Objects . . . . . . . . . . . . . . . . 274 12.1.2 Transform Feedback Primitive Capture . . . . . . . . . . 276 12.2 Primitive Queries . . . . . . . . . . . . . . . . . . . . . . . . . . 281 12.3 Flatshading . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 12.4 Primitive Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . 281 12.4.1 Clipping Shader Outputs . . . . . . . . . . . . . . . . . . 283 . . . . . . . . . . . . . . . . . . . . 283 12.5.1 Controlling the Viewport . . . . . . . . . . . . . . . . . . 284 12.5 Coordinate Transformations . . . . . . . . . . 13 Fixed-Function Primitive Assembly and Rasterization 13.3 Points . 286 13.1 Discarding Primitives Before Rasterization . . . . . . . . . . . . 287 . . . . . . . . . . . . . . . . . . . . . . . . . . 288 13.2 Invariance . 13.2.1 Multisampling . . . . . . . . . . . . . . . . . . . . . . . 288 . . . . . . . . . . . . . . . . . . . . . . . . . . 290 13.3.1 Basic Point Rasterization . . . . . . . . . . . . . . . . . . 290 13.3.2 Point Multisample Rasterization . . . . . . . . . . . . . . 290 . . . . . . . . . . . . . . . . . . . . . . . . . . 291 13.4.1 Basic Line Segment Rasterization . . . . . . . . . . . . . 291 13.4.2 Other Line Segment Features . . . . . . . . . . . . . . . . 294 13.4.3 Line Rasterization State . . . . . . . . . . . . . . . . . . 295 13.4.4 Line Multisample Rasterization . . . . . . . . . . . . . . 295 . . . . . . . . . . . . . . . . . . . . . . . . . . 296 13.5.1 Basic Polygon Rasterization . . . . . . . . . . . . . . . . 296 13.5.2 Depth Offset . . . . . . . . . . . . . . . . . . . . . . . . 299 13.4 Line Segments 13.5 Polygons . . . . . OpenGL ES 3.1 (March 17, 2014)
分享到:
收藏