`A Speci cation
`Version ..
`
`Mark Segal
`Kurt Akeley
`
`Editor version . : Chris Frazier
`Editor versions ., .. : Jon Leech
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`Copyright c 1992-1999 Silicon Graphics, Inc.
`
`This document contains unpublished information of
`Silicon Graphics, Inc.
`
`This document is protected by copyright, and contains information propri-
`etary to Silicon Graphics, Inc. Any copying, adaptation, distribution, public
`performance, or public display of this document without the express written
`consent of Silicon Graphics, Inc. is strictly prohibited. The receipt or pos-
`session of this document 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.
`
`U.S. Government Restricted Rights Legend
`
`Use, duplication, or disclosure by the Government is subject to restrictions
`set forth in FAR .. c or subparagraph c ii of the Rights
`in Technical Data and Computer Software clause at DFARS .-
`andor in similar or successor clauses in the FAR or the DOD or NASA FAR
`Supplement. Unpublished rights reserved under the copyright laws of the
`United States. Contractormanufacturer is Silicon Graphics, Inc., N.
`Shoreline Blvd., Mountain View, CA - .
`
`OpenGL is a registered trademark of Silicon Graphics, Inc.
`Unix is a registered trademark of The Open Group.
`The "X" device and X Windows System are trademarks of
`The Open Group.
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`Contents
`
` Introduction
`. . . . . . . . . . . . . . . .
` . Formatting of Optional Features
` . What is the OpenGL Graphics System? . . . . . . . . . . . .
` . Programmer’s View of OpenGL . . . . . . . . . . . . . . . . .
` .
`Implementor’s View of OpenGL . . . . . . . . . . . . . . . . .
` . Our View . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
` OpenGL Operation
`. . . . . . . . . . . . . . . . . . . . .
`. OpenGL Fundamentals
`. . Floating-Point Computation . . . . . . . . . . . . . .
`. GL State
`. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. GL Command Syntax . . . . . . . . . . . . . . . . . . . . . .
`. Basic GL Operation . . . . . . . . . . . . . . . . . . . . . . .
`. GL Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. BeginEnd Paradigm . . . . . . . . . . . . . . . . . . . . . . .
`.. Begin and End Objects
`. . . . . . . . . . . . . . . . .
`.. Polygon Edges
`. . . . . . . . . . . . . . . . . . . . . .
`.. GL Commands within BeginEnd . . . . . . . . . . .
`. Vertex Speci cation . . . . . . . . . . . . . . . . . . . . . . .
`. Vertex Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Coordinate Transformations . . . . . . . . . . . . . . . . . . .
`. . Controlling the Viewport
`. . . . . . . . . . . . . . . .
`. . Matrices . . . . . . . . . . . . . . . . . . . . . . . . . .
`. . Normal Transformation . . . . . . . . . . . . . . . . .
`. . Generating Texture Coordinates
`. . . . . . . . . . . .
`. Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Current Raster Position . . . . . . . . . . . . . . . . . . . . .
`. Colors and Coloring . . . . . . . . . . . . . . . . . . . . . . .
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`i
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`ii
`
`CONTENTS
`
`. . Lighting . . . . . . . . . . . . . . . . . . . . . . . . . .
`. . Lighting Parameter Speci cation . . . . . . . . . . . .
`. . ColorMaterial
`. . . . . . . . . . . . . . . . . . . . .
`. . Lighting State
`. . . . . . . . . . . . . . . . . . . . . .
`. . Color Index Lighting . . . . . . . . . . . . . . . . . . .
`. . Clamping or Masking . . . . . . . . . . . . . . . . . .
`. . Flatshading . . . . . . . . . . . . . . . . . . . . . . . .
`. . Color and Texture Coordinate Clipping . . . . . . . .
`. . Final Color Processing . . . . . . . . . . . . . . . . . .
`
`
`
`
`
`
`
`
`
`
`
`
` Rasterization
`
` .
`Invariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
` . Antialiasing . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
` . Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
` . . Point Rasterization State . . . . . . . . . . . . . . . .
`
` . Line Segments
`. . . . . . . . . . . . . . . . . . . . . . . . . .
`
` .. Basic Line Segment Rasterization . . . . . . . . . . . .
`
` .. Other Line Segment Features . . . . . . . . . . . . . .
`
` .. Line Rasterization State . . . . . . . . . . . . . . . . .
`
` . Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
` .. Basic Polygon Rasterization . . . . . . . . . . . . . . .
`
` ..
`Stippling . . . . . . . . . . . . . . . . . . . . . . . . .
`
` .. Antialiasing . . . . . . . . . . . . . . . . . . . . . . . .
`
` .. Options Controlling Polygon Rasterization . . . . . .
`
` .. Depth O set
`. . . . . . . . . . . . . . . . . . . . . . .
`
` .. Polygon Rasterization State . . . . . . . . . . . . . . .
`
` . Pixel Rectangles
`. . . . . . . . . . . . . . . . . . . . . . . . .
`
` .. Pixel Storage Modes . . . . . . . . . . . . . . . . . . .
`
` .. The Imaging Subset . . . . . . . . . . . . . . . . . . .
`
` .. Pixel Transfer Modes
`. . . . . . . . . . . . . . . . . .
`
` .. Rasterization of Pixel Rectangles . . . . . . . . . . . .
` .. Pixel Transfer Operations . . . . . . . . . . . . . . . .
` . Bitmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
` . Texturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
` .. Texture Image Speci cation . . . . . . . . . . . . . . .
` .. Alternate Texture Image Speci cation Commands
`. .
` .. Texture Parameters
`. . . . . . . . . . . . . . . . . . .
` .. Texture Wrap Modes . . . . . . . . . . . . . . . . . . .
` .. Texture Mini cation . . . . . . . . . . . . . . . . . . .
` .. Texture Magni cation . . . . . . . . . . . . . . . . . .
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`CONTENTS
`
`iii
`
` .. Texture State and Proxy State . . . . . . . . . . . . .
` .. Texture Objects
`. . . . . . . . . . . . . . . . . . . . .
` .. Texture Environments and Texture Functions . . . . .
` .. Texture Application . . . . . . . . . . . . . . . . . . .
` . Color Sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
` . Fog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
` . Antialiasing Application . . . . . . . . . . . . . . . . . . . . .
`
`
` Per-Fragment Operations and the Framebu er
`. Per-Fragment Operations
`. . . . . . . . . . . . . . . . . . . .
`. . Pixel Ownership Test
`. . . . . . . . . . . . . . . . . .
`. .
`Scissor test
`. . . . . . . . . . . . . . . . . . . . . . . .
`. . Alpha test . . . . . . . . . . . . . . . . . . . . . . . . .
`. .
`Stencil test
`. . . . . . . . . . . . . . . . . . . . . . . .
`. . Depth bu er test . . . . . . . . . . . . . . . . . . . . .
`. . Blending . . . . . . . . . . . . . . . . . . . . . . . . . .
`. . Dithering . . . . . . . . . . . . . . . . . . . . . . . . .
`. . Logical Operation . . . . . . . . . . . . . . . . . . . .
`. Whole Framebu er Operations . . . . . . . . . . . . . . . . .
`..
`Selecting a Bu er for Writing . . . . . . . . . . . . . .
`.. Fine Control of Bu er Updates . . . . . . . . . . . . .
`.. Clearing the Bu ers . . . . . . . . . . . . . . . . . . .
`.. The Accumulation Bu er . . . . . . . . . . . . . . . .
`. Drawing, Reading, and Copying Pixels . . . . . . . . . . . . .
`. . Writing to the Stencil Bu er
`. . . . . . . . . . . . . .
`. . Reading Pixels . . . . . . . . . . . . . . . . . . . . . .
`. . Copying Pixels . . . . . . . . . . . . . . . . . . . . . .
`. . Pixel DrawRead state . . . . . . . . . . . . . . . . . .
`
`
` Special Functions
`. Evaluators . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Display Lists
`. . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Flush and Finish . . . . . . . . . . . . . . . . . . . . . . . . .
`. Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`
` State and State Requests
`. Querying GL State . . . . . . . . . . . . . . . . . . . . . . . .
`. .
`Simple Queries . . . . . . . . . . . . . . . . . . . . . .
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`iv
`
`CONTENTS
`
`. . Data Conversions . . . . . . . . . . . . . . . . . . . . .
`. . Enumerated Queries . . . . . . . . . . . . . . . . . . .
`. . Texture Queries
`. . . . . . . . . . . . . . . . . . . . .
`. .
`Stipple Query . . . . . . . . . . . . . . . . . . . . . . .
`. . Color Matrix Query . . . . . . . . . . . . . . . . . . .
`. . Color Table Query . . . . . . . . . . . . . . . . . . . .
`. . Convolution Query . . . . . . . . . . . . . . . . . . . .
`. . Histogram Query . . . . . . . . . . . . . . . . . . . . .
`. . Minmax Query . . . . . . . . . . . . . . . . . . . . . .
`. . Pointer and String Queries
`. . . . . . . . . . . . . . .
`. . Saving and Restoring State . . . . . . . . . . . . . . .
`. State Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`
`A Invariance
`A. Repeatability . . . . . . . . . . . . . . . . . . . . . . . . . . .
`A. Multi-pass Algorithms . . . . . . . . . . . . . . . . . . . . . .
`A. Invariance Rules
`. . . . . . . . . . . . . . . . . . . . . . . . .
`A. What All This Means
`. . . . . . . . . . . . . . . . . . . . . .
`
`B Corollaries
`
`
`
`
`C Version .
`C. Vertex Array . . . . . . . . . . . . . . . . . . . . . . . . . . .
`C. Polygon O set
`. . . . . . . . . . . . . . . . . . . . . . . . . .
`C. Logical Operation . . . . . . . . . . . . . . . . . . . . . . . .
`C. Texture Image Formats
`. . . . . . . . . . . . . . . . . . . . .
`C. Texture Replace Environment . . . . . . . . . . . . . . . . . .
`C. Texture Proxies . . . . . . . . . . . . . . . . . . . . . . . . . .
`C. Copy Texture and Subtexture . . . . . . . . . . . . . . . . . .
`C. Texture Objects
`. . . . . . . . . . . . . . . . . . . . . . . . .
`C. Other Changes . . . . . . . . . . . . . . . . . . . . . . . . . .
`C. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . .
`
`
`D Version .
`D. Three-Dimensional Texturing . . . . . . . . . . . . . . . . . .
`D. BGRA Pixel Formats
`. . . . . . . . . . . . . . . . . . . . . .
`D. Packed Pixel Formats
`. . . . . . . . . . . . . . . . . . . . . .
`D. Normal Rescaling . . . . . . . . . . . . . . . . . . . . . . . . .
`D. Separate Specular Color . . . . . . . . . . . . . . . . . . . . .
`D. Texture Coordinate Edge Clamping
`. . . . . . . . . . . . . .
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`CONTENTS
`
`v
`
`D. Texture Level of Detail Control . . . . . . . . . . . . . . . . .
`D. Vertex Array Draw Element Range . . . . . . . . . . . . . . .
`D. Imaging Subset . . . . . . . . . . . . . . . . . . . . . . . . . .
`D. . Color Tables
`. . . . . . . . . . . . . . . . . . . . . . .
`D. . Convolution . . . . . . . . . . . . . . . . . . . . . . . .
`D. . Color Matrix . . . . . . . . . . . . . . . . . . . . . . .
`D. . Pixel Pipeline Statistics . . . . . . . . . . . . . . . . .
`D. . Constant Blend Color . . . . . . . . . . . . . . . . . .
`D. . New Blending Equations . . . . . . . . . . . . . . . . .
`D. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . .
`
`E Version ..
`
`
`
`
`F ARB Extensions
`F. Naming Conventions . . . . . . . . . . . . . . . . . . . . . . .
`F. Multitexture
`. . . . . . . . . . . . . . . . . . . . . . . . . . .
`F.. Dependencies . . . . . . . . . . . . . . . . . . . . . . .
`F..
`Issues
`. . . . . . . . . . . . . . . . . . . . . . . . . . .
`F.. Changes to Section . BeginEnd Paradigm
`. . . .
`F.. Changes to Section . Vertex Speci cation . . . . .
`F.. Changes to Section . Vertex Arrays
`. . . . . . . .
`F.. Changes to Section . . Matrices . . . . . . . . . .
`F.. Changes to Section . . Generating Texture Coor-
`dinates . . . . . . . . . . . . . . . . . . . . . . . . . .
`F.. Changes to Section . Current Raster Position . .
`F.. Changes to Section . Texturing . . . . . . . . . . .
`F.. Changes to Section .. Texture Mini cation . . . .
`F.. Changes to Section .. Texture Objects . . . . . .
`F.. Changes to Section .. Texture Application
`. . .
`F.. Changes to Section . Evaluators
`. . . . . . . . . .
`F.. Changes to Section . Feedback . . . . . . . . . . .
`F.. Changes to Section . . Data Conversions
`. . . . .
`F.. Changes to Section . . Saving and Restoring State
`
`Index of OpenGL Commands
`
`
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`List of Figures
`
`. . . . . . . . . . . . . . . . . . . .
`. Block diagram of the GL.
`. Creation of a processed vertex from a transformed vertex and
`current values.
`. . . . . . . . . . . . . . . . . . . . . . . . . .
`. Primitive assembly and processing. . . . . . . . . . . . . . . .
`. Triangle strips, fans, and independent triangles. . . . . . . . .
`. Quadrilateral strips and independent quadrilaterals.
`. . . . .
`. Vertex transformation sequence.
`. . . . . . . . . . . . . . . .
`. Current raster position.
`. . . . . . . . . . . . . . . . . . . . .
`. Processing of RGBA colors.
`. . . . . . . . . . . . . . . . . . .
`. Processing of color indices.
`. . . . . . . . . . . . . . . . . . .
`. ColorMaterial operation. . . . . . . . . . . . . . . . . . . . . .
`
`
`
`
`
`
`
`
`
`
`
`
`
`
` . Rasterization. . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
` . Rasterization of non-antialiased wide points. . . . . . . . . . .
`
` . Rasterization of antialiased wide points.
`. . . . . . . . . . . .
`
` . Visualization of Bresenham’s algorithm.
`. . . . . . . . . . . .
`
` . Rasterization of non-antialiased wide lines.
`. . . . . . . . . .
`
` . The region used in rasterizing an antialiased line segment. . .
`
` . Operation of DrawPixels.
`. . . . . . . . . . . . . . . . . . .
`
` . Selecting a subimage from an image
`. . . . . . . . . . . . . .
` . A bitmap and its associated parameters. . . . . . . . . . . . .
` . A texture image and the coordinates used to access it.
`. . . .
`
`. Per-fragment operations. . . . . . . . . . . . . . . . . . . . . .
`. Operation of ReadPixels.
`. . . . . . . . . . . . . . . . . . .
`. Operation of CopyPixels.
`. . . . . . . . . . . . . . . . . . .
`
`. Map Evaluation.
`. Feedback syntax.
`
`. . . . . . . . . . . . . . . . . . . . . . . . .
`. . . . . . . . . . . . . . . . . . . . . . . . .
`
`vi
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`LIST OF FIGURES
`
`vii
`
`F. Creation of a processed vertex from a transformed vertex and
`current values.
`. . . . . . . . . . . . . . . . . . . . . . . . . .
`F. Current raster position.
`. . . . . . . . . . . . . . . . . . . . .
`F. Multitexture pipeline.
`. . . . . . . . . . . . . . . . . . . . . .
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`List of Tables
`
`. . . . . . . . . . . . . . . . . . . . . .
`. GL command su xes
`. GL data types
`. . . . . . . . . . . . . . . . . . . . . . . . . .
`. Summary of GL errors . . . . . . . . . . . . . . . . . . . . . .
`. Vertex array sizes values per vertex and data types . . . . .
`. Variables that direct the execution of InterleavedArrays.
`.
`. Component conversions
`. . . . . . . . . . . . . . . . . . . . .
`. Summary of lighting parameters.
`. . . . . . . . . . . . . . . .
`. Correspondence of lighting parameter symbols to names. . . .
`. Polygon atshading color selection. . . . . . . . . . . . . . . .
`
` . PixelStore parameters pertaining to one or more of Draw-
`.
`Pixels, TexImage D, TexImageD, and TexImage D.
` . PixelTransfer parameters.
`. . . . . . . . . . . . . . . . . . .
` . PixelMap parameters.
`. . . . . . . . . . . . . . . . . . . . .
` . Color table names.
`. . . . . . . . . . . . . . . . . . . . . . . .
` . DrawPixels and ReadPixels types . . . . . . . . . . . . . .
` . DrawPixels and ReadPixels formats.
`. . . . . . . . . . . .
` . Swap Bytes Bit ordering.
`. . . . . . . . . . . . . . . . . . . .
` . Packed pixel formats. . . . . . . . . . . . . . . . . . . . . . . .
` .
`UNSIGNED
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Version 1.2.1 - April 1, 1999
`
`
`
`LIST OF TABLES
`
`ix
`
` . Texture parameters and their values. . . . . . . . . . . . . . .
` . Replace and modulate texture functions. . . . . . . . . . . . .
` . Decal and blend texture functions.
`. . . . . . . . . . . . . . .
`
`. Values controlling the source blending function and the source
`. . . . .
`blending values they compute. f = minAs; (cid:0) Ad.
`. Values controlling the destination blending function and the
`destination blending values they compute.
`. . . . . . . . . .
`. Arguments to LogicOp and their corresponding operations. .
`. Arguments to DrawBu er and the bu ers that they indicate.
`. PixelStore
`parameters
`pertaining
`to ReadPixels,
`GetTexImage D, GetTexImageD, GetTexImage D,
`GetColorTable, GetConvolutionFilter, GetSeparable-
`Filter, GetHistogram, and GetMinmax. . . . . . . . . . .
`. ReadPixels index masks. . . . . . . . . . . . . . . . . . . . .
`. ReadPixels GL Data Types and Reversed component con-
`version formulas.
`. . . . . . . . . . . . . . . . . . . . . . . . .
`
`. . . . . . . . . . . .
`. Values speci ed by the target to Map .
`. Correspondence of feedback type to number of values per vertex.
`
`. Texture, table, and lter return values. . . . . . . . . . . . . .
`. Attribute groups . . . . . . . . . . . . . . . . . . . . . . . . .
`. State variable types
`. . . . . . . . . . . . . . . . . . . . . . .
`. GL Internal begin-end state variables inaccessible . . . . . .
`. Current Values and Associated Data . . . . . . . . . . . . . .
`. Vertex Array Data . . . . . . . . . . . . . . . . . . . . . . . .
`. Transformation state . . . . . . . . . . . . . . . . . . . . . . .
`. Coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Lighting see also Table . for defaults . . . . . . . . . . . .
`. Lighting cont. . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Rasterization . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Texture Objects
`. . . . . . . . . . . . . . . . . . . . . . . . .
`. Texture Objects cont.
`. . . . . . . . . . . . . . . . . . . . .
`. Texture Environment and Generation . . . . . . . . . . . . .
`. Pixel Operations . . . . . . . . . . . . . . . . . . . . . . . . .
`. Framebu er Control
`. . . . . . . . . . . . . . . . . . . . . . .
`. Pixels
`. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Pixels cont. . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Pixels cont. . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`x
`
`LIST OF TABLES
`
`. Pixels cont. . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Pixels cont. . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Evaluators GetMap takes a map name
`. . . . . . . . . . .
`. Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`. Implementation Dependent Values . . . . . . . . . . . . . . .
`. More Implementation Dependent Values . . . . . . . . . . . .
`. Implementation Dependent Pixel Depths . . . . . . . . . . . .
`. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`F. Changes to State Tables . . . . . . . . . . . . . . . . . . . . .
`F. Changes to State Tables cont. . . . . . . . . . . . . . . . . .
`F. New State Introduced by Multitexture . . . . . . . . . . . . .
`F. New Implementation-Dependent Values Introduced by Mul-
`titexture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`Chapter
`
`Introduction
`
`This document describes the OpenGL graphics system: what it is, how it
`acts, and what is required to implement it. We assume that the reader has
`at least a rudimentary understanding of computer graphics. This means
`familiarity with the essentials of computer graphics algorithms as well as
`familiarity with basic graphics hardware and associated terms.
`
` . Formatting of Optional Features
`
`Starting with version . of OpenGL, some features in the speci cation are
`considered optional; an OpenGL implementation may or may not choose to
`provide them see section ...
`Portions of the speci cation which are optional are so labelled where
`they are de ned. Additionally, those portions are typeset in gray, and state
`table entries which are optional are typeset
`
`Version 1.2.1 - April 1, 1999
`
`
`
`
`
`CHAPTER .
`
`INTRODUCTION
`
`framebu er. Further, some of OpenGL is speci cally concerned with frame-
`bu er manipulation.
`
` . Programmer’s View of OpenGL
`
`To the programmer, OpenGL is a set of commands that allow the speci -
`cation of geometric objects in two or three dimensions, together with com-
`mands that control how these objects are rendered into the framebu er.
`For the most part, OpenGL provides an immediate-mode interface, mean-
`ing that specifying an object causes it to be drawn.
`A typical program that uses OpenGL begins with calls to open a window
`into the framebu er into which the program will draw. Then, calls are made
`to allocate a GL context and associate it with the window. Once a GL con-
`text is allocated, the programmer is free to issue OpenGL commands. Some
`calls are used to draw simple geometric objects i.e. points, line segments,
`and polygons, while others a ect the rendering of these primitives includ-
`ing how they are lit or colored and how they are mapped from the user’s
`two- or three-dimensional model space to the two-dimensional screen. There
`are also calls to e ect direct control of the framebu er, such as reading and
`writing pixels.
`
` .
`
`Implementor’s View of OpenGL
`
`To the implementor, OpenGL is a set of commands that a ect the opera-
`tion of graphics hardware. If the hardware consists only of an addressable
`framebu er, then OpenGL must be implemented almost entirely on the host
`CPU. More typically, the graphics hardware may comprise varying degrees
`of graphics acceleration, from a raster subsystem capable of rendering two-
`dimensional lines and polygons to sophisticated oating-point processors
`capable of transforming and computing on geometric data. The OpenGL
`implementor’s task is to provide the CPU software interface while dividing
`the work for each OpenGL command between the CPU and the graphics
`hardware. This division must be tailored to the available graphics hardware
`to obtain optimum performance in carrying out OpenGL calls.
`OpenGL maintains a considerable amount of state information. This
`state controls how objects are drawn into the framebu er. Some of this
`state is directly available to the user: he or she can make calls to obtain its
`value. Some of it, however, is visible only by the e ect it has on what is
`drawn. One of the main goals of this speci cation is to make OpenGL state
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
` .. OUR VIEW
`
`
`
`information explicit, to elucidate how it changes, and to indicate what its
`e ects are.
`
` . Our View
`
`We view OpenGL as a state machine that controls a set of speci c draw-
`ing operations. This model should engender a speci cation that satis es
`the needs of both programmers and implementors. It does not, however,
`necessarily provide a model for implementation. An implementation must
`produce results conforming to those produced by the speci ed methods, but
`there may be ways to carry out a particular computation that are more
`e cient than the one speci ed.
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`Chapter
`
`OpenGL Operation
`
`. OpenGL Fundamentals
`
`OpenGL henceforth, the GL" is concerned only with rendering into a
`framebu er and reading values stored in that framebu er. There is no
`support for other peripherals sometimes associated with graphics hardware,
`such as mice and keyboards. Programmers must rely on other mechanisms
`to obtain user input.
`The GL draws primitives subject to a number of selectable modes. Each
`primitive is a point, line segment, polygon, or pixel rectangle. Each mode
`may be changed independently; the setting of one does not a ect the settings
`of others although many modes may interact to determine what eventually
`ends up in the framebu er. Modes are set, primitives speci ed, and other
`GL operations described by sending commands in the form of function or
`procedure calls.
`Primitives are de ned by a group of one or more vertices. A vertex
`de nes a point, an endpoint of an edge, or a corner of a polygon where
`two edges meet. Data consisting of positional coordinates, colors, normals,
`and texture coordinates are associated with a vertex and each vertex is
`processed independently, in order, and in the same way. The only exception
`to this rule is if the group of vertices must be clipped so that the indicated
`primitive ts within a speci ed region; in this case vertex data may be
`modi ed and new vertices created. The type of clipping depends on which
`primitive the group of vertices represents.
`Commands are always processed in the order in which they are received,
`although there may be an indeterminate delay before the e ects of a com-
`mand are realized. This means, for example, that one primitive must be
`
`
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`. . OPENGL FUNDAMENTALS
`
`
`
`drawn completely before any subsequent one can a ect the framebu er. It
`also means that queries and pixel read operations return state consistent
`with complete execution of all previously invoked GL commands. In gen-
`eral, the e ects of a GL command on either GL modes or the framebu er
`must be complete before any subsequent command can have any such e ects.
`In the GL, data binding occurs on call. This means that data passed
`to a command are interpreted when that command is received. Even if the
`command requires a pointer to data, those data are interpreted when the
`call is made, and any subsequent changes to the data have no e ect on the
`GL unless the same pointer is used in a subsequent command.
`The GL provides direct control over the fundamental operations of D
`and D graphics. This includes speci cation of such parameters as trans-
`formation matrices, lighting equation coe cients, antialiasing methods, and
`pixel update operators. It does not provide a means for describing or mod-
`eling complex geometric objects. Another way to describe this situation is
`to say that the GL provides mechanisms to describe how complex geometric
`objects are to be rendered rather than mechanisms to describe the complex
`objects themselves.
`The model for interpretation of GL commands is client-server. That is, a
`program the client issues commands, and these commands are interpreted
`and processed by the GL the server. The server may or may not operate
`on the same computer as the client.
`In this sense, the GL is network-
`transparent." A server may maintain a number of GL contexts, each of which
`is an encapsulation of current GL state. A client may choose to connect to
`any one of these contexts. Issuing GL commands when the program is not
`connected to a context results in unde ned behavior.
`The e ects of GL commands on the framebu er are ultimately controlled
`by the window system that allocates framebu er resources. It is the window
`system that determines which portions of the framebu er the GL may access
`at any given time and that communicates to the GL how those portions
`are structured. Therefore, there are no GL commands to con gure the
`framebu er or initialize the GL. Similarly, display of framebu er contents
`on a CRT monitor including the transformation of individual framebu er
`values by such techniques as gamma correction is not addressed by the GL.
`Framebu er con guration occurs outside of the GL in conjunction with the
`window system; the initialization of a GL context occurs when the window
`system allocates a window for GL rendering.
`The GL is designed to be run on a range of graphics platforms with vary-
`ing graphics capabilities and performance. To accommodate this variety, we
`specify ideal behavior instead of actual behavior for certain GL operations.
`
`Version 1.2.1 - April 1, 1999
`
`APPENDIX T
`
`Microsoft Corp. Exhibit 1005
`
`
`
`
`
`CHAPTER . OPENGL OPERATION
`
`In cases where deviation from the ideal is allowed, we also specify the rules
`that an implementation must obey if it is to approximate the ideal behavior
`usefully. This allowed variation in GL behavior implies that two distinct
`GL implementations may not agree pixel for pixel when presented with the
`same input even when run on identical framebu er con gurations.
`Finally, command names, constants, and types are pre xed in the GL
`by gl, GL
`
`Version 1.2.1 - April 1, 1999
`
`
`
`. . GL COMMAND SYNTAX
`
`
`
`function. Although we describe the operations that the GL performs on the
`framebu er, the framebu er is not a part of GL state.
`We distinguish two types of state. The rst type of state, called GL
`server state, resides in the GL server. The majority of GL state falls into
`this category. The second type of state, called GL client state, resides in the
`GL client. Unless otherwise speci ed, all state referred to in this document
`is GL server state; GL client state is speci cally identi ed. Each instance of
`a GL context implies one complete set of GL server state; each connection
`from a client to a server implies a set of both GL client state and GL server
`state.
`While an implementation of the GL may be hardware dependent, this
`discussion is independent of the speci c hardware on which a GL is imple-
`mented. We are therefore concerned with the state of graphics hardware
`only when it corresponds precisely to GL state.
`
`. GL Command Syntax
`
`GL commands are functions or procedures. Various groups of commands
`perform the same operation but di er in how arguments are supplied to
`them. To conveniently accommodate this variation, we adopt a notation for
`describing commands and their arguments.
`GL commands are formed from a name followed, depending on the par-
`ticular command, by up to characters. The rst character indicates the
`number of values of the indicated type that must be presented to the com-
`mand. The second character or character pair indicates the speci c type of
`the arguments: -bit integer, -bit integer, -bit integer, single-precision
` oating-point, or double-precision oating-point. The nal character, if
`present, is v, indicating that the command takes a pointer to an array a
`vector of values rather than a series of individual arguments. Two speci c
`examples come from the Vertex command:
`
`void Vertex f float x, float y, float z ;
`
`and
`
`void Vertexsv short v ;
`
`These examples show the ANSI C declarations for these commands. In
`general, a command declaration has the form
`
`Version 1.2.1 - April 1, 1999
`
`
`
`
`
`CHAPTER . OPENGL OPERATION
`
`Version 1.2.1 - April 1, 1999
`
`
`
`.. BASIC GL OPERATION
`
`
`
`void Normal ffdgv T arg ;
`means the two declarations
`
`void Normal fv float arg ;
`void Normal dv double arg ;
`
`Arguments whose type is xed i.e. not indicated by a su x on the
`command are of one of types or pointers to one of these. These types
`are summarized in Table ..
`
`. Basic GL Operation
`
`Figure . shows a schematic diagram of the GL. Commands enter the GL
`on the left. Some commands specify geometric objects to be drawn while
`others control how the objects are handled by the various s