OpenGL on Silicon Graphics Systems explains how to use the OpenGL graphics library on Silicon Graphics systems. This guide expands the description of OpenGL programming presented in the book OpenGL Programming Guide, which describes aspects of OpenGL that are implementation-independent.
This guide describes the following major topics:
Integrating OpenGL programs with the X Window System
Using OpenGL extensions
Debugging OpenGL programs
Achieving maximum performance
Though some items in this guide apply to all Silicon Graphics visualization systems, this guide explicitly addresses the following families of visualization systems:
Silicon Graphics VPro systems (Fuel and Tezro systems)
Silicon Graphics InfinitePerformance systems
Silicon Graphics InfiniteReality systems
Silicon Graphics Onyx4 UltimateVision systems
Silicon Graphics Prism systems (Linux systems)
This guide consists of the following chapters and appendixes:
Chapter 1, “OpenGL on Silicon Graphics Systems” introduces the major issues involved in using OpenGL on Silicon Graphics systems.
Chapter 2, “OpenGL and X: Getting Started” first provides background information for working with OpenGL and the X Window System. You then learn how to display some OpenGL code in an X window with the help of a simple example program.
Chapter 3, “OpenGL and X: Examples” first presents two example programs that illustrate how to create a window using IRIS IM or Xlib. It then explains how to integrate text with your OpenGL program.
Chapter 4, “OpenGL and X: Advanced Topics” helps you refine your programs. It discusses how to use overlays and popups. It also provides information about pixmaps, visuals and colormaps, and animation.
Chapter 5, “Introduction to OpenGL Extensions” explains what OpenGL extensions are and how to check for OpenGL and GLX extension availability.
Chapter 6, “Resource Control Extensions” describes extensions that facilitate management of buffers and similar resources. Most of these extensions are GLX extensions.
Chapter 7, “Vertex Processing Extensions” explains how to use vertex processing extensions.
Chapter 8, “Texturing Extensions”explains how to use the texturing extensions, providing example code as appropriate.
Chapter 9, “Rendering Extensions” explains how to use extensions that allow you to customize the system's behavior during the rendering portion of the graphics pipeline. This includes blending extensions; the sprite, point parameters, reference plane, multisample, and shadow extensions; and the fog function and fog offset extensions.
Chapter 10, “Imaging Extensions” explains how to use extensions for color conversion (abgr, color table, color matrix), the convolution extension, the histogram/minmax extension, and the packed pixel extension.
Chapter 11, “Video Extensions” discusses extensions that can be used to enhance OpenGL video capabilities.
Chapter 12, “Miscellaneous OpenGL Extensions” explains how to use the instruments and list priority extensions as well as two extensions to GLU.
Chapter 13, “Vertex and Fragment Program Extensions” explains how to use the programmable shading extensions introduced in Onyx4 and Silicon Graphics Prism graphics systems.
Chapter 14, “OpenGL Tools” explains how to use the OpenGL debugger (ogldebug) and discusses the glc OpenGL character renderer and (briefly) the gls OpenGL Streaming codec.
Chapter 15, “Tuning Graphics Applications: Fundamentals” starts with a list of general debugging hints. It then discusses basic principles of tuning graphics applications: pipeline tuning, tuning animations, optimizing cache and memory use, and benchmarking. You need this information as a background for the chapters that follow.
Chapter 16, “Tuning the Pipeline” explains how to tune the different parts of the graphics pipeline for an OpenGL program. Example code fragments illustrate how to write your program for optimum performance.
Chapter 17, “Tuning Graphics Applications: Examples” provides a detailed discussion of the tuning process for a small example program. It also provides a code fragment that is helpful for drawing pixels fast.
Chapter 18, “System-Specific Tuning” provides information on tuning some specific Silicon Graphics systems: InfiniteReality, Onyx4, and Silicon Graphics Prism systems.
Appendix A, “Benchmarks” lists a sample benchmarking program.
Appendix B, “Benchmarking Libraries: libpdb and libisfast” discusses two libraries you can use for benchmarking drawing operations and maintaining a database of the results.
Appendix C, “System Support for OpenGL Versions and Extensions” list the OpenGL core versions and all extensions currently supported on VPro, InfinitePerformance, InfiniteReality, Onyx4, and Silicon Graphics Prism systems.
Appendix D, “XFree86 Configuration Specifics” provides information about customizing the XF86Config file for Silicon Graphics Prism systems.
To work successfully with this guide, you should be comfortable programming in ANSI C or C++. You should have a fairly good grasp of graphics programming concepts (terms such as “texture map” and “homogeneous coordinates” are not explained in this guide), and you should be familiar with the OpenGL graphics library. Some familiarity with the X Window System, and with programming for Silicon Graphics platforms in general, is also helpful. If you are a newcomer to any of these topics, see the references listed in section “Background Reading”.
The following books provide background and complementary information for this guide. Bibliographical information or the SGI document number is provided. Books available online from SGI are marked with (S). For access information, see section “Obtaining Publications”.
Kilgard, Mark J. OpenGL Programming for the X Window System. Menlo Park, CA: Addison-Wesley Developer's Press, 1996. ISBN 0-201-48369-9.
Note that while still useful, this book does not describe the newer features of GLX 1.3.
Dave Shreiner, OpenGL Architecture Review Board, Mason Woo, Jackie Neider and Tom Davis. OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 1.4. Reading, MA: Addison Wesley Longman Inc., 2003. ISBN 0-321-17348-1.
Dave Shreiner, OpenGL Architecture Review Board. OpenGL 1.4 Reference Manual (4th Edition). The Official Reference Document for OpenGL, Version 1.4. Reading, MA: Addison Wesley Longman Inc., 2004. ISBN 0-321-17383-X.
OpenGL Porting Guide (007-1797-030) (S)
Silicon Graphics Onyx4 UltimateVision User's Guide (007-4634-xxx) (S)
Silicon Graphics UltimateVision Graphics Porting Guide (007-4297-001) (S)
Silicon Graphics Prism Visualization System User's Guide (007-4701-xxx) (S)
Obtaining Maximum Performance on Silicon Graphics Prism Visualization Systems (007-4271-xxx) (S)
O'Reilly X Window System Series, Volumes 1, 2, 4, 5, and 6 (referred to in the text as “O'Reilly” with a volume number):
Nye, Adrian. Volume One: Xlib Programming Manual. Sebastopol, CA: O'Reilly & Associates, 1992. (S)
Volume Two. Xlib Reference Manual. Sebastopol, CA: O'Reilly & Associates, 1992.
Nye, Adrian, and Tim O'Reilly. Volume Four. X Toolkit Intrinsics Programming Manual. Sebastopol, CA: O'Reilly & Associates, 1992. (S)
Flanagan, David (ed). Volume Five. X Toolkit Intrinsics Reference Manual. Sebastopol, CA: O'Reilly & Associates, 1992.
Heller, Dan. Volume Six. Motif Programming Manual. Sebastopol, CA: O'Reilly & Associates.
Young, Doug. Application Programming with Xt: Motif Version
Kimball, Paul E. The X Toolkit Cookbook. Englewood Cliffs, NJ: Prentice Hall, 1995.
Open Software Foundation. OSF/Motif Programmer's Guide, Revision 1.2. Englewood Cliffs, NJ: Prentice Hall, 1993. (S)
Open Software Foundation. OSF/Motif Programmer's Reference, Revision 1.2. Englewood Cliffs, NJ: Prentice Hall, 1993. (S)
Open Software Foundation. OSF/Motif User's Guide, Revision 1.2. Englewood Cliffs, NJ: Prentice Hall, 1993.
Open Software Foundation. OSF/Motif Style Guide. Englewood Cliffs, NJ: Prentice Hall. (S)
Kane, Gerry. MIPS RISC Architecture. Englewood Cliffs, NJ: Prentice Hall. 1989.
MIPS Compiling and Performance Tuning Guide. 007-2479-001. (S)
You can obtain SGI documentation in the following ways:
See the SGI Technical Publications Library at http://docs.sgi.com . Various formats are available. This library contains the most recent and most comprehensive set of online books, release notes, man pages, and other information.
If it is installed on your SGI system, you can use InfoSearch, an online tool that provides a more limited set of online books, release notes, and man pages. With an IRIX system, select Help from the Toolchest, and then select InfoSearch. Or you can type infosearch on a command line.
On IRIX, you can also view release notes by typing either grelnotes or relnotes on a command line.
You can also view man pages by typing man <title> on a command line.
SGI ProPack for Linux documentation and all other documentation included in the RPMs on the distribution CDs can be found on the CD titled SGI ProPack 3 for Linux - Documentation CD. To access the information on the documentation CD, open the index.html file with a web browser. After installation, all SGI ProPack for Linux documentation (including README.SGI ) is in the directory /usr/share/doc/sgi-propack-3.0.
This section explains the typographical and function-naming conventions used in this guide.
This guide uses the following typographical conventions:
Convention | Meaning |
command | This fixed-space font denotes literal items such as commands, files, routines, path names, signals, messages, and programming language structures. |
function | This bold font indicates a function or method name. Parentheses are also appended to the name. |
variable | Italic typeface denotes variable entries and words or concepts being defined. |
user input | This bold, fixed-space font denotes literal items that the user enters in interactive sessions. (Output is shown in nonbold, fixed-space font.) |
[] | Brackets enclose optional portions of a command or directive line. |
... | Ellipses indicate that a preceding element can be repeated. |
manpage(x) | Man page section identifiers appear in parentheses after man page names. |
GUI element | This font denotes the names of graphical user interface (GUI) elements such as windows, screens, dialog boxes, menus, toolbars, icons, buttons, boxes, fields, and lists. |
This guide refers to a group of similarly named OpenGL functions by a single name, using an asterisk to indicate all the functions whose names start the same way. For instance, glVertex*() refers to all functions whose names begin with “glVertex”: glVertex2s(), glVertex3dv(), glVertex4fv(), and so on.
Naming conventions for X-related functions can be confusing, because they depend largely on capitalization to differentiate between groups of functions. For systems on which both OpenGL and IRIS GL are available, the issue is further complicated by the similarity in function names. Here's a quick guide to old and new function names:
GLX*() | IRIS GL mixed-model support | |
Glx*() | IRIS GL support for IRIS IM | |
glX*() | OpenGL support for X | |
GLw*() | OpenGL support for IRIS IM |
Note that the OpenGL glX*() routines are collectively referred to as GLX.
If you have comments about the technical accuracy, content, or organization of this document, contact SGI. Be sure to include the title and document number of the manual with your comments. (Online, the document number is located in the front matter of the manual. In printed manuals, the document number is located at the bottom of each page.)
You can contact SGI in any of the following ways:
Send e-mail to the following address:
techpubs@sgi.com
Use the Feedback option on the Technical Publications Library webpage:
Contact your customer service representative and ask that an incident be filed in the SGI incident tracking system.
Send mail to the following address:
Technical Publications
SGI
1500 Crittenden Lane, M/S 535
Mountain View, CA 94043-1351
Send a fax to the attention of “Technical Publications” at +1 650 932 0801.
SGI values your comments and will respond to them promptly.