The OpenGL Graphics System. A Specification (Version 4.5 (Core Profile) - May 28, 2015).pdf

(2890 KB) Pobierz
The OpenGL
R
Graphics System:
A Specification
(Version 4.5 (Core Profile) - May 28, 2015)
Mark Segal
Kurt Akeley
Editor (version 1.1): Chris Frazier
Editor (versions 1.2-4.5 ): Jon Leech
Editor (version 2.0): Pat Brown
Copyright c 2006-2015 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 Specification . . . . . . . . . . . .
1.1.1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 What is the OpenGL Graphics System? . . . . . . . . . . . .
1.2.1 Programmer’s View of OpenGL . . . . . . . . . . . .
1.2.2 Implementor’s View of OpenGL . . . . . . . . . . . .
1.2.3 Our View . . . . . . . . . . . . . . . . . . . . . . . .
1.2.4 Fixed-function Hardware and the Compatibility Profile
1.2.5 The Deprecation Model . . . . . . . . . . . . . . . .
1.3 Related APIs . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.1 OpenGL Shading Language . . . . . . . . . . . . . .
1.3.2 OpenGL ES . . . . . . . . . . . . . . . . . . . . . . .
1.3.3 OpenGL ES Shading Language . . . . . . . . . . . .
1.3.4 WebGL . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.5 Window System Bindings . . . . . . . . . . . . . . .
1.3.6 OpenCL . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 Filing Bug Reports . . . . . . . . . . . . . . . . . . . . . . .
OpenGL Fundamentals
2.1 Execution Model . . . . . . . . . . . . . . . . . . . .
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 Graphics Reset Recovery . . . . . . . . . . . .
2.3.3 Flush and Finish . . . . . . . . . . . . . . . .
2.3.4 Numeric Representation and Computation . . .
1
1
1
1
2
2
2
3
3
3
4
4
4
5
5
6
7
7
8
8
10
12
14
15
15
18
19
20
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
i
CONTENTS
2.3.5 Fixed-Point Data Conversions
Rendering Commands . . . . . . . .
Context State . . . . . . . . . . . . .
2.5.1 Generic Context State Queries
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 . . . . . . . . .
2.6.14 . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
24
25
26
26
26
27
28
29
29
29
29
30
30
30
30
31
31
31
31
32
35
35
37
39
40
41
45
48
50
51
51
51
51
52
52
53
54
2.4
2.5
2.6
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 . . . . . .
4.3 Time 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 . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
OpenGL 4.5 (Core Profile) - May 28, 2015
Zgłoś jeśli naruszono regulamin