Next | Prev | Up | Top | Contents | Index

OpenGL

OpenGL is a software interface to graphics hardware. It consists of about 120 commands that you can use to specify the objects and operations needed to create interactive programs that produce color images of moving 3D objects. OpenGL is an industry standard for 2D and 3D graphics rendering and is a part of the IDO.

OpenGL uses a client-server model for interpretation of commands. An application using OpenGL can run under IRIX on any Silicon Graphics platform and be rendered on a platform with another operating system and window system, provided the implementation of OpenGL on each platform conforms to the standard.

OpenGL doesn't include commands for performing windowing tasks or obtaining user input. For that you must work through the windowing system that controls your hardware. Since the OpenGL application programming interface (API) is independent of hardware platforms, window systems, and operating systems, porting among conforming implementations of OpenGL is an easy task.

OpenGL allows you to build the models you need from a small set of geometric primitives--points, lines, and polygons. It doesn't provide high-level commands for describing models of 3D objects--Silicon Graphics provides higher level graphics libraries for these tasks. One of these libraries is Open Inventor, which is built on OpenGL and uses OpenGL calls for rendering. You can write your application using the OpenGL API, although it's often easier to use one of the higher level libraries. Using the higher level graphics libraries makes rendering operations transparent to your application, which allows you to concentrate on your application rather than on the time-consuming details of rendering.

Note: IRIS Performer and the ImageVision Library are being converted from IRIS GL (the precursor to OpenGL) to the OpenGL standard. The OpenGL library contains functions for

Figure 6-1 shows an object created by OpenGL--a sphere illuminated by a light source.

Figure 6-1 : Using the Lighting Feature of OpenGL Figure 6-2 shows another object created by OpenGL--a texture-mapped Bezier surface mesh.

Figure 6-2 : Using the Texture-Mapping Feature of OpenGL OpenGL provides a small but powerful set of rendering commands, and all higher-level drawing must be done using these commands. To simplify your programming tasks, OpenGL provides a Utility Library (GLU) that includes routines that encapsulate OpenGL commands. These GLU routines perform tasks such as:


Next | Prev | Up | Top | Contents | Index