`EX. 1027
`
`
`
`
`
`Activision Blizzard/Riot
`Ex. 1027 - Page 1
`
`
`
`OpenGL
`Reference Manual
`Second Edition
`
`The Ofificial Reference Document
`to 0penGL, Version I .1
`
`OpenGL Architecture Review Board
`Editors: Renate Kempf and Chris Frazier
`
`A
`VV
`
`ADDISON-WESLEY DEVELOPERS PRESS
`An Imprint of Addision Wesley Longman, Inc.
`
`Reading, Massachusetts - Harlow, England 0 Menlo Park, California
`Berkeley, California 0 Don Mills, Ontario - Sydney
`Bonn - Amsterdam 0 Tokyo 0 Mexico City
`
`Ex. 1027 - Page 2
`
`
`
`Silicon Graphics, the Silicon Graphics logo, OpenGL,and IRIS are registered
`trademarks and IRIS Graphics Library is a trademark of Silicon Graphics, Inc.
`X Window System is a trademark of Massachusetts Institute of Technology.
`
`Many of the designations used by manufacturers and sellers to distinguish their
`products are claimed as trademarks. Where those designations appear in this book,
`and Addison-Wesley was aware of a trademark claim, the designations have been
`printed in initial capital letters or all capital letters.
`'
`
`Library of Congress Cataloging-in-Publication Data
`
`OpenGL reference manual: the official reference document to OpenGL,
`version 1.1 /OpenGL Architecture Review Board; Renate Kernpf and
`Chris Frazier, editors.
`p.
`cm.
`ISBN 0-201-46140-4
`
`I. Kempf, Renate.
`1. Computer graphics. 2. OpenGL.
`ll. Frazier, Chris. 111. OpenGL Architecture Review Board.
`T3850642
`1996
`006.6'6—dc21
`
`96-37076
`CIP
`
`Copyright © 1997 by Silicon Graphics, Inc.
`
`A-W Developers Press is a division of Addison Wesley Longman, Inc.
`
`All rights reserved. No part of this publication may be reproduced, stored in a
`retrieval system, or transmitted, in any form or by any means, electronic,
`mechanical, photocopying, recording, or otherwise, without the prior written
`permission of the publisher. Printed in the United States of America. Published
`simultaneously in Canada.
`
`Sponsoring Editor: Mary Treseler
`Project Manager: John Fuller
`Production Assistant: Melissa Lirna
`
`Cover Design: Jean Seal
`Text Design: Electric Ink, Ltd., and Kay Maitz
`
`Set in 10-point Stone Serif
`
`2345678
`
`00999897
`
`2nd Printing July, 1997
`
`Addison—Wesley books are available for bulk purchases by corporations,
`institutions, and other organizations. For more information please contact the
`Corporate, Government, and Special Sales Department at (800) 238-9682.
`
`Find A-W Developers Press on the World Wide Web at:
`http://www.aw.com/devpress/
`
`Ex. 1027 - Page 3
`
`
`
`Contents
`
`Preface ............................................................................................... ..vii
`
`What You Should Know Before Reading This Manual ..................... ..viii
`Style Conventions ............................................................................... ..ix
`
`Acknowledgments ............................................................................... .. ix
`
`Introduction to OpenGL ....................................................................... .. 1
`
`OpenGL Fundamentals ........................................................................ .. 2
`
`OpenGL Primitives and Commands .............................................. .. 2
`
`OpenGL as a Procedural Language ................................................ .. 2
`
`The OpenGL Execution Model ...................................................... .. 3
`
`Basic OpenGL Operation ...................................................................... .. 3
`
`Overview of Commands and Routines ............................................... .. 7
`
`The OpenGL Processing Pipeline ......................................................... .. 8
`Vertices ......................................................................................... .. 10
`
`Primitives ...................................................................................... .. 1 1
`
`Fragments ..................................................................................... .. 14
`
`Pixels ............................................................................................ .. 16
`
`Additional OpenGL Commands ........................................................ .. 16
`
`Using Evaluators ........................................................................... .. 16
`
`Performing Selection and Feedback ............................................. .. 17
`
`Using Display Lists ....................................................................... .. 18
`
`Ex. 1027 - Page 4
`
`
`
`Managing Modes and Execution ..................
`
`........
`
`........ .. 18
`
`Obtaining State Information ....................................................... .. 19
`
`OpenGL Utility Library ...................................................................... .. 19
`
`Manipulating Images for Use in Texturing ................................. .. 19
`
`Transforming Coordinates ........................................................... .. 20
`
`Polygon Tessellation ........
`
`....
`
`.......
`
`......................... .. 20
`
`Rendering Spheres, Cylinders, and Disks .................................... .. 21
`NURBS Curves and Surfaces .......................
`............................ .. 21
`
`Handling Errors ............................................................................ .. 22
`
`OpenGL Extension to the X Window System ................................... .. 22
`Initialization .......
`........
`..................................... .. 23
`
`Controlling Rendering ................................................................. .. 23
`
`3. Summary of Commands and Routines ............................................. .. 25
`
`Notation ............................................................................................. .. 26
`
`............... .. 27
`OpenGL Commands....... ...................................
`Primitives ..................................................................................... .. 27
`
`27
`....................
`Vertex Arrays ...................................................
`Coordinate Transformation ......................................................... .. 28
`Coloring and Lighting ................................................................. .. 28
`Clipping. .........
`......
`......
`....
`........
`.......................... .. 29
`Rasterization ................................................................................ .. 29
`
`30
`...........
`Pixel Operations ...............................................
`Textures ........................................................................................ .. 30
`
`Fog ................................................................................................ .. 32
`
`.......... .; ............. .. 32
`Frame Buffer Operations........ .................
`Evaluators ..................................................................................... .. 33
`
`Selection and Feedback ..............................
`
`................
`
`33
`
`Display Lists ................................................................................. .. 34
`Modes and Execution .................................................................. .. 34
`
`State Queries.... ...............
`
`....
`
`......
`
`................. ..34
`
`Ex. 1027 - Page 5
`
`
`
`GLU Routines ................... ..». ................................................................ ..35
`
`Texture Images .............................................................................. ..35
`Coordinate Transformation ......................................................... ..35
`
`Polygon Tessellation ..................................................................... ..36
`
`Quadric Objects ........ .._ .................................................................. ..36
`NURBS Curves and Surfaces ......................................................... ..37
`
`State Queries ......................................................... .; ...................... ..38
`
`GLX Routines ...................................................................................... ..38
`
`Initialization ................................................................................. ..38
`
`Controlling Rendering ................................................................. ..39
`
`Defined Constants and Associated Commands ............................... ..41
`
`OpenGL Reference Pages .................................................................. ..59
`
`GLU Reference Pages ...................................................................... ..383
`
`GLX Reference Pages ...................................................................... ..455
`
`Ex. 1027 - Page 6
`
`
`
`The OpenGL commands you issue specify how a certain result should be
`produced (that is, what procedure should be followed) rather than What
`exactly that result should look like. Because of this procedural nature, it
`helps to know how OpenGL Works—the order in which it carries out its
`operations, for example—in order to fully understand how to use it.
`
`The OpenGL Execution Model
`
`OpenGL uses a client-server model for interpreting commands. An applica-
`tion (the client) issues commands, which are interpreted and processed by
`OpenGL (the server). The server may or may not operate on the same
`computer as the client. In this sense, OpenGL is network-transparent. A
`server can maintain several GL contexts, each of which is an encapsulated
`GL state. A client can connect to any one of these contexts. The required
`network protocol can be implemented by augmenting an already existing
`protocol (such as that of the X Window System) or by using an independent
`protocol. OpenGL doesn't provide commands for obtaining user input.
`
`The effects of OpenGL commands on the frame buffer are ultimately con-
`trolled by the window system that allocates frame buffer resources. The
`window system determines which portions of the frame buffer OpenGL
`may access at any given time and communicates to OpenGL how those
`portions are structured. Therefore, there are no OpenGL commands to
`configure the frame buffer or initialize OpenGL. Frame buffer configuration
`takes place outside of OpenGL in conjunction with the window system;
`OpenGL initialization takes place when the window system allocates a
`window for OpenGL rendering. (GLX, the X extension of the OpenGL
`interface, provides these capabilities, as described in "OpenGL Extension to
`the X Window System.”)
`
`Basic ‘OpenGL Operation
`
`Figure 1-1 provides an abstract, high-level block diagram of how OpenGL
`processes data. In the diagram, commands enter from the left and proceed
`through what can be thought of as a processing pipeline. Some commands
`specify geometric objects to be drawn, and others control how the objects
`are handled during the various processing stages.
`
`Basic OpenGL Operation
`
`Ex. 1027 - Page 7
`
`
`
`commands
`
`’
`
`Evaluator
`
`Per-Vertex
`O%efat_"_’”S
`& nmrtive
`Assembly
`
`Rasterization
`
`Pep
`Fragment
`Operations
`
`Texture
`Memory
`
`Pixel
`
`Operations
`
`Figure 1-1
`
`How OpenGL Processes Data
`
`When commands enter the pipeline, you can choose to either have all com-
`mands proceed immediately through the pipeline or accumulate some of
`them in a display list for processing at a later time.
`
`The evaluator stage of processing provides an efficient means for
`approximating curve and surface geometry by evaluating polynomial
`commands of input values. During the next stage, per-vertex operations and
`primitive assembly, OpenGL processes geometric primitives———points, line
`segments, and polygons, all of which are described by vertices. Vertices are
`transformed and lit, and primitives are clipped to the viewport in prepara-
`tion for the next stage.
`
`Rasterization produces a series of frame buffer addresses and associated
`Values using a two-dimensional description of a point, line segment, or
`polygon. Each fragment so produced is fed into the last stage, per-fragment
`operations, which performs the final operations on the data before it's stored
`as pixels in the frame buffer. These operations include conditional updates
`to the frame buffer based on incoming and previously stored depth-Values
`(for depth-buffering). They also include blending of incoming pixel colors
`with stored colors, as well as masking and other logical operations on
`pixel values.
`
`Input data can be in the form of pixels rather than vertices. Such data,
`which might describe an image for use in texture mapping, skips the first
`stage of processing (just described) and instead is processed as pixels, in
`the pixel operations stage. The result of this stage is either stored as texture
`
`Chapter 1: Introduction to OpenGL
`
`Ex. 1027 - Page 8
`
`
`
`memory, for use in the rasterization stage, or rasterized. In that case, the
`resulting fragments are merged into the frame buffer just as if they were
`generated from geometric data.
`
`An OpenGL application can obtain all elements of OpenGL state, including
`the contents of the texture memory and even of the frame buffer.
`
`Basic OpenGL Operation
`
`Ex. 1027 - Page 9
`
`
`
`Ex. 1027 - Page 10
`
`Ex. 1027 - Page 10