
This page is an informal attempt to summarize the main differences between SGI's OpenGL and Microsoft's Direct3D. First, each API is summarized in an attempt to bring a balanced presentation of the two APIs. Then a feature comparison is made between the capabilities of OpenGL and Direct3D.
Unless otherwise noted, "OpenGL" refers to the OpenGL 1.2 core with no extensions and "Direct3D" refers to Direct3D8, the Direct3D interface in DirectX 8. When a difference between Direct3D7 and Direct3D8 is noteworthy, version numbers are given.
This document assumes that the reader is familiar with the architecture of a traditional 3D graphics pipeline as commonly used with scanline rendering techniques. For more information on such architectures, the reader is encouraged to consult a 3D graphics text such as "3D Computer Graphics" by Alan Watt and Mark Watt. This is only one book of many 3D graphics books, the interested reader is encouraged to browse a good technical bookstore and find one that speaks to them most effectively.
SGI's OpenGL is a procedural 3D graphics API, the successor to Iris GL which originated in the Unix workstation market. Iris GL is the graphics API used on a succession of 3D graphics workstations designed and built by Silicon Graphics, Inc.
"OpenGL" is a trademark of the OpenGL Architectural Review Board (ARB). The ARB controls the definition of OpenGL through control of the specification by which an implementation may call itself "OpenGL". The specification is an English prose document with associated mathematics that define the semantics of the API. The ARB also governs a suite of conformance tests that serve as a validation suite for an implementation.
The ARB was formed in 1992 and functions under a set of bylaws to revise and oversee the specification of the API.
OpenGL defines a state machine that controls the rendering pipeline. State machine attributes are modified through procedure calls and vertices defining graphic primitives are specified to the pipeline through procedure calls.
Only the OpenGL 1.2 core is considered in this document, not extensions.
Microsoft's Direct3D is a COM based 3D graphics API originating in a third-party 3D graphics API for x86 architectures. Microsoft acquired the technology in 1996 and has been offering the API as a component of its DirectX technology. Direct3D contains an immediate-mode interface and a strctured hierarchical scene graph interface called retained mode. Only the immediate-mode interface is considered in this document.
Microsoft defines the Direct3D API through its COM interfaces, and the semantics are defined by the the help files and sample code accompanying the software development kit provided by Microsoft.
Direct3D first appeared in DirectX 3 with execute buffers as its display paradigm. All subsequent releases, beginning with DirectX 5 (there was no DirectX 4), replaced execute buffers with a more traditional graphics primitive display paradigm.
OpenGL and Direct3D both expose a traditional graphics rendering pipeline. This basic pipeline design has been present since the earliest days of computer graphics and has been enhanced and extended over the years as hardware has become more capable, but the fundamental paradigm has not changed.
Vertices are described to the pipeline as a bundle of data consisting of coordinates in space defining the vertex's location and associated per-vertex data. A graphics primitive is described to the pipeline as an ordered set of vertices. How vertices are combined into various primitives -- generally points, lines and triangles -- is defined by the particular API.
Rather than provide an exhaustive list of features where both OpenGL and Direct3D provide the same feature, I will list the differences.
| Feature | OpenGL 1.2 Core | Direct3D 7 | Direct3D 8 |
|---|---|---|---|
| System Mechanics | |||
| Operating System Support | Windows (9x, NT, 2000), MacOS, BeOS, *nix, others | Windows (9x, 2000, CE) [12] | Windows (9x, 2000) [12] |
| API Definition Control | OpenGL ARB | Microsoft | Microsoft |
| API Specification | OpenGL Specification [10] | SDK/DDK Documentation and DDK Reference | SDK Documentation |
| API Mechanism | includes and libraries | COM | COM |
| Software Emulation of Unaccelerated Features [4] | Yes | No | No [11] |
| Extension Mechanism [5] | Yes | No | Yes |
| Source Implementation Available [6] | Yes | Yes | No |
| Modeling | |||
| Fixed-Function Vertex Blending | No | Yes | Yes |
| Programmable Vertex Blending | No | No | Yes |
| Parametric Curve Primitives | Yes | No | Yes |
| Parametric Surface Primitives | Yes | No | Yes |
| Hierarchical Display Lists | Yes | No [8] | No [8] |
| Rendering | |||
| Two-sided Lighting | Yes | No [1] | No [1] |
| Point Size Rendering Attributes [9] | Yes | No | Yes |
| Line Width Rendering Attributes [9] | Yes | No | No |
| Programmable Pixel Shading | No [14] | No | Yes |
| Triadic Texture Blending Operations | No | No | Yes |
| Cube Environment Mapping | No | Yes | Yes |
| Volume Textures | Yes | No | Yes |
| Multitexture Cascade | No [13] | Yes | Yes |
| Texture Temporary Result ReGISter | No | No | Yes |
| Mirror Texture Addressing | No | Yes | Yes |
| Texture "Wrapping" | No | Yes | Yes |
| Range-Based Fog | No | Yes | Yes |
| Bump Mapping | No | Yes | Yes |
| Modulate 2X Texture Blend | No | Yes | Yes |
| Modulate 4X Texture Blend | No | Yes | Yes |
| Add Signed Texture Blend | No | Yes | Yes |
| Frame Buffer | |||
| Hardware Independent Z Buffer Access | Yes | No [2] | No [2] |
| Full-Screen Antialiasing | Yes | Yes | Yes |
| Motion Blur | Yes | No | Yes |
| Depth of Field | Yes | No | Yes |
| Accumulation Buffers | Yes | No | No [7] |
| Miscellaneous | |||
| Picking Support | Yes | No [3] | No [3] |
| Multiple Monitor Support | No | Yes | Yes |
| Stereo Rendering | Yes | Yes | No |
Notes:
In several ASPects, a comparison between OpenGL and Direct3D is similar to a comparison between OpenGL and PEX. Many of the same differences exist for Direct3D.