When I was a product manager at Microsoft for the Windows NT operating system, I published a technical paper describing the support for OpenGL graphics that was added into the operating system at that time. The OpenGL 3D graphics library provided for very powerful, high-performance graphics capabilities that ultimately formed the foundation for the animation effects that are used in movies like Toy Story or the CAD tools that are used to design cars and airplanes. There are several really good books on OpenGL that can be read for further background:
|Evans & Sutherland||Freedom PC series|
|Intergraph||GLI and GLZ adapters|
|Matrox||MGA Impression Plus|
||Applies an image (such as a bitmap) to a graphics primitive. This feature can be used to generate more realistic images. For example, a table surface can be drawn as a rectangle and a wood-grain texture can be applied to it.|
||Supports contexts with front and back color buffers. Smooth animation can be achieved by drawing into the back buffer, which isn't actively displayed. When the application is ready to display the new image, it simply swaps buffers to the back buffer.|
||Provides the ability to buffer "depth." This is mainly used for hidden line and hidden surface removal.|
||Applies smooth shading to a geometric primitive. This computes subtle differences in color across a given surface.|
||Accurately computes the color of any point, given material properties such as refraction index and reflection properties for the surface and a lighting model.|
||Permits modular relative positioning of different objects in a scene and changes the viewing perspective of an object in 3-D coordinate space.|
|Anti-aliasing||Reduces jagged edges in lines as they are drawn on a computer display.|
||Specifies an opacity component in addition to RGB color information. Alpha specifies opacity with a range that goes from completely transparent to opaque.|
Prior to evaluating OpenGL applications, there are a number of performance considerations to review. These performance considerations generally are dependent on the way that the OpenGL application implemented certain functions. Many of these considerations are outlined in the following paragraphs. For additional details, please refer to documentation in the Microsoft Windows NT SDK and Windows NT DDK.
Most OpenGL applications perform either single-buffer rendering or double-buffer rendering. In single-buffer mode, pictures are dynamically drawn as they are constructed. Because the process of drawing distracts from the final picture, most applications prefer to use double-buffering, in which pictures are constructed in a back buffer and blt'd to the front buffer when ready. Games and animation packages typically require double-buffering; some CAD packages will run in single-buffer mode if double-buffering is not available.
In single-buffer mode, it is important that glFlush commands be issued regularly. Otherwise, the picture may not be drawn dynamically. An end-user may have to wait for seconds or minutes before anything is drawn if the glFlush command is not issued regularly.
The system bus architecture can create a performance bottleneck in 3-D rendering. The bus limits the pixel throughput to the screen, especially in a software implementation. In particular, this limits the fill and swap buffer rates. A PCI or VESA local bus provides far better rendering performance over an ISA or EISA bus.
In general, picture resolution and size affect the performance of the software implementation of OpenGL more than the hardware implementation. A larger triangle affects more pixels and, consequently, will take longer to render in the software rendering mode. In a hardware implementation, touching the pixels may be so fast that the time difference of rendering large and small triangles may be negligible compared to the time needed to set up the hardware for the triangle.
Figure 3 - This picture was modeled using OpenGL
Most graphics vendors who quote performance numbers for OpenGL often quote the number of triangles per second they can draw. Most use triangles that have 50 pixels, while some quote numbers with triangles that have 25 pixels. The average size of a typical triangle in a system is dependent on the application and the resolution and size of the display. In terms of resolution, most of today's 3-D games for PC systems run in 320x200 resolution in order to achieve high rates of graphics performance. In the near future, as system performance increases, many will run at a higher resolution.
The number of color bit-planes affects 3D graphics performance. When rendering into a bitmap (or pixmap in X window), the color bit depth of a bitmap is an important performance factor.
Most X-window implementations of OpenGL support direct and indirect rendering. In direct rendering, an application draws directly to the hardware registers on the client side. In indirect rendering, drawing commands are packaged on the client side and sent to the server for rendering via a protocol. In Windows NT Workstation, only indirect rendering is currently supported.
On SMP machines, multi-thread rendering may yield significant performance gains for some applications. Multi-threading may be performed in multiple windows, in multiple bitmaps, in multiple tasks or a combination of the above. An application that takes advantage of multi-threading can perform better than a single-threaded application.
OpenGL provides numerous advanced 3-D graphics capabilities. Commonly used primitives include 3-D lighted z-enabled shaded triangle, 2-D flat shaded lines, and perspective-corrected modulated textures. Less commonly used features include accumulation buffer, alpha buffer, stencil buffer, and fog.
An OpenGL application can render a picture directly or by using a display list. A display list caches the commands that can be displayed multiple times. A display list can improve performance in certain hardware or in indirect rendering.
A drawback with display lists is that they contain read-only picture descriptions. If the picture needs modification, a new display list needs to be constructed. As a result, its use is limited to playback and viewing of a final picture.
OpenGL applications are floating point intensive. It is important to take into account the floating point performance of the CPU. In general, CPUs such as the Alpha, MIPS®, or PowerPC processors will offer higher levels of performance for OpenGL applications than Intel processors.
While there are many other performance considerations, such as loop unrolling and other capabilities, it is not the goal of this document to cover all aspects of performance benchmarks.
Note 1: Windows 95 also supports OpenGL as a native 3-D API. A beta version of the OpenGL API for Windows 95 was released in the summer of 1995. It will be available through the Microsoft Developer's Network service.
Note 2: PC Magazine, December 20, 1994 issue.
Note 3: Detailed in the Foundation Imaging case study. Microsoft part number 098-58443.
Note 4: This article is still published on Microsoft's website at http://www.microsoft.com/TechNet/winnt/ntwrkstn/prodfact/opengl.asp
For more information on OpenGL graphics technology, including code examples and details on the underlying mathematical models for the graphics engines, the following books are all good resources. It is worth noting that the first two books in this list are pretty much the canonical books on the topic written by the original creators of the OpenGL graphics library and are published by the standards body that is responsible for the API. The other books are written much more from the perspective of the developer who is looking to implement OpenGL within their applications.
|OpenGL(r) 1.2 Programming Guide, Third Edition by Mason Woo, Jackie Neider, Tom Davis, Dave Shreiner, OpenGL Architecture Review Board|
|OpenGL Reference Manual: The Official Reference Guide to OpenGL version 1.2 by Dave Shreiner, OpenGL Architectural Review Board|
|OpenGL Super Bible (2nd Edition); Richard S. Wright, Jr. and Michael R. Sweet|
|3D Computer Graphics: A User's Guide for Artists and Designers by Andrew S. Glassner|
|Interactive Computer Graphics: A Top Down Approach with OpenGL; Edward Angel|
|OpenGL Programming for Windows 95 and Windows NT; Ron Fosner|
© 1995 Microsoft Corporation
Microsoft and Windows are registered trademarks and Windows NT is a trademark of Microsoft Corporation. IRIS GL, MIPS and Open Inventor are trademarks and OpenGL is a registered trademark of Silicon Graphics, Inc. NeTpower is a trademark of NeTpower, Inc.