HOME

TheInfoList



OR:

Direct3D and OpenGL are competing
application programming interface An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
s (APIs) which can be used in applications to render 2D and 3D
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
. ,
graphics processing unit A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, m ...
s (GPUs) almost always implement one version of both of these APIs. Examples include:
DirectX Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct" ...
9 and
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
2 circa 2004; DirectX 10 and OpenGL 3 circa 2008; and most recently, DirectX 11 and OpenGL 4 circa 2011. GPUs that support more recent versions of the standards are
backwards compatible Backward or Backwards is a relative direction. Backwards or Sdrawkcab (the word "backwards" with its letters reversed) may also refer to: * "Backwards" (''Red Dwarf''), episode of sci-fi TV sitcom ''Red Dwarf'' ** ''Backwards'' (novel), a nov ...
with applications that use the older standards; for example, one can run older DirectX 9 games on a more recent DirectX 11-certified GPU.


Availability

Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
application development targets the
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
platform. The
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
API is an open standard, which means that various hardware makers and operating system developers can freely create an OpenGL implementation as part of their system. OpenGL implementations exist for a wide variety of platforms. Most notably, OpenGL is the dominating graphics API of Unix-like computer systems. From an application developer's perspective, Direct3D and OpenGL are equally open; full documentation and necessary development tools are available with no restrictions. In more detail, the two computer graphics APIs are the following: #
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
is a
proprietary {{Short pages monitor Direct3D does support texture format extensions (via '' FourCC''). These were once little-known and rarely used, but are now used for
S3 Texture Compression S3 Texture Compression (S3TC) (sometimes also called DXTn, DXTC, or BCn) is a group of related lossy texture compression algorithms originally developed by Iourcha et al. of S3 Graphics, Ltd. for use in their Savage 3D computer graphics accelerat ...
. When graphics cards added support for
pixel shader In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the Rendering (computer graphics), rendering of a 3D scene - a process known as ''shading''. Shaders have evolved ...
s (known on OpenGL as "fragment shaders"), Direct3D provided one "Pixel Shader 1.1" (PS1.1) standard with which the
GeForce GeForce is a brand of graphics processing units (GPUs) designed by Nvidia. As of the GeForce 40 series, there have been eighteen iterations of the design. The first GeForce products were discrete GPUs designed for add-on graphics boards, inte ...
3 and up, and
Radeon Radeon () is a brand of computer products, including graphics processing units, random-access memory, RAM disk software, and solid-state drives, produced by Radeon Technologies Group, a division of AMD. The brand was launched in 2000 by ATI Tech ...
8500 and up, advertised compatibility. Under OpenGL the same functions were accessed through a variety of custom extensions. In theory, the Microsoft approach allows one code path to support both brands of card, whereas under OpenGL, programmers must write two separate systems. In reality, though, because of the limits on pixel processing of those early cards, Pixel Shader 1.1 was nothing more than a pseudo-assembly language version of the NVIDIA-specific OpenGL extensions. For the most part, the only cards that claimed PS 1.1 functionality were by NVIDIA, and that is because they were built for it natively. When the Radeon 8500 was released, Microsoft released an update to Direct3D that included Pixel Shader 1.4, which was nothing more than a pseudo-assembly language version of the
ATI Ati or ATI may refer to: * Ati people, a Negrito ethnic group in the Philippines **Ati language (Philippines), the language spoken by this people group ** Ati-Atihan festival, an annual celebration held in the Philippines *Ati language (China), a ...
-specific OpenGL extensions. The only cards that claimed PS 1.4 support were ATI cards because they were designed with the precise hardware needed to make that functionality happen. This situation existed only for a short time under both APIs. Second-generation pixel shading cards functioned far more similarly, with each architecture evolving toward the same kind of pixel processing conclusion. As such, Pixel Shader 2.0 allowed a unified code path under Direct3D. Around the same time OpenGL introduced its own ARB-approved vertex and pixel shader extensions (GL_ARB_vertex_program and GL_ARB_fragment_program), and both sets of cards supported this standard also.


Users


Professional graphics

OpenGL has always seen more use in the professional graphics market than DirectX, while DirectX is used mostly for computer games. (The term ''professional'' is used here to refer to the professional production and display of graphics, such as in computer animated films and scientific visualisation, as opposed to games where the graphics produced are for the end user's personal, rather than professional, use.) Currently both OpenGL and DirectX have a large enough overlap in functionality that either could be used for most common purposes, with the operating system often being the main criterion dictating which is used; DirectX is the common choice for Windows, and OpenGL for nearly everything else. Some esoteric applications still divide the applicability of the two APIs: doing accelerated 3D across a network connection is only directly supported by OpenGL with ''OpenGL Extension to the X Window System'' (
GLX GLX (initialism for "OpenGL Extension to the X Window System") is an extension to the X Window System core protocol providing an interface between OpenGL and the X Window System as well as extensions to OpenGL itself. It enables programs wishi ...
), for example. In the past, many professional graphics cards supported only OpenGL. As of 2010, virtually all professional cards which work on the Windows platform will also support Direct3D. Part of this has been a change in the professional graphics market from largely Unix-based hardware like SGIs and Suns to lower cost PC-based systems, leading to the growth of Windows in this market segment, while at the same time providing a new market for OpenGL software in Unix-based consumer systems running Linux or Mac OS X. The principal historical reason for OpenGL's dominance in the professional market was performance. Many professional graphics applications (for example,
Softimage Autodesk Softimage, or simply Softimage () was a 3D computer graphics application, for producing 3D computer graphics, 3D modeling, and computer animation. Now owned by Autodesk and formerly titled Softimage, XSI, the software has been predomina ...
, 3D,
Alias Alias may refer to: * Pseudonym * Pen name * Nickname Arts and entertainment Film and television * ''Alias'' (2013 film), a 2013 Canadian documentary film * ''Alias'' (TV series), an American action thriller series 2001–2006 * ''Alias the J ...
PowerAnimator PowerAnimator and Animator, also referred to simply as "Alias", the precursor to what is now Maya and StudioTools, is a highly integrated industrial 3D modeling, animation, and visual effects suite. It had a relatively long track record, starting ...
) were originally written in
IRIS GL IRIS GL (Integrated Raster Imaging System Graphics Library) is a proprietary graphics API created by Silicon Graphics (SGI) in the early 1980s for producing 2D and 3D computer graphics on their IRIX-based IRIS graphical workstations. Later SGI re ...
for high-end SGI workstations, which were far more capable, both graphically and in raw CPU power, than the PCs of the time. Later, many of these were ported to OpenGL, even as the personal computer was evolving into a system powerful enough to run some professional graphics applications. Users were able to run
Maya Maya may refer to: Civilizations * Maya peoples, of southern Mexico and northern Central America ** Maya civilization, the historical civilization of the Maya peoples ** Maya language, the languages of the Maya peoples * Maya (Ethiopia), a popul ...
, for example, the successor to
Alias Alias may refer to: * Pseudonym * Pen name * Nickname Arts and entertainment Film and television * ''Alias'' (2013 film), a 2013 Canadian documentary film * ''Alias'' (TV series), an American action thriller series 2001–2006 * ''Alias the J ...
PowerAnimator PowerAnimator and Animator, also referred to simply as "Alias", the precursor to what is now Maya and StudioTools, is a highly integrated industrial 3D modeling, animation, and visual effects suite. It had a relatively long track record, starting ...
on either SGIs or Windows-based personal computers (and today on Linux, Mac OS X, and Windows). Price competition eventually broke SGI's dominance in the market, but the established base of OpenGL software engineers and the broadening user base for OpenGL in Apple, Linux, and other operating systems, has resulted in a market where both DirectX and OpenGL are viable, widespread APIs. The other reason for OpenGL's historic advantage was marketing and design. DirectX is a set of APIs that were not marketed for professional graphics applications. Indeed, they were not even designed for such uses. DirectX was an API designed for low-level, high-performance access to broadly available, lower-performance, consumer-priced graphics hardware for the purpose of game development. OpenGL is a much more general purpose 3D API, targeting a full range of graphics hardware from low-end commodity graphics cards up to professional and scientific graphics visualization well out of the range of the average consumer, and providing features that are not necessarily exclusive for a specific kind of user. Gaming developers typically haven't demanded as wide an API as professional graphics system developers. Many games don't need overlay planes, stencils, and so on, although this hasn't prevented some game developers from using them when available. Specifically, game designers are rarely interested in the pixel invariance demanded in certain parts of the OpenGL standards, which are conversely highly useful to film and computer-aided modeling. An attempt was once made to merge OpenGL and DirectX by SGI and Microsoft. The
Fahrenheit graphics API Fahrenheit was an effort to create a unified high-level API for 3D computer graphics to unify Direct3D and OpenGL. It was designed primarily by Microsoft and SGI and also included work from an HP-MS joint effort. Direct3D and OpenGL are low-lev ...
was intended to bring together both the high end ability of OpenGL with the broad low-level support of DirectX. Microsoft eventually retreated from the project, having never allocated sufficient resources to produce its part of the rendering engine. The move was widely held to be purposed to ensure lock-in of developers to the Windows-DirectX platform, which would be lost if the Fahrenheit API became the world de facto standard graphics API. However, Fahrenheit led to many improvements in DirectX, with the main architect of Fahrenheit even joining Microsoft to assist in the development of DirectX in 2003.


Gaming

In the earliest days of 3D accelerated gaming, performance and reliability were key benchmarks and several 3D accelerator cards competed against each other for dominance. Software was written for a specific brand of graphics card. However, over the years, OpenGL and Direct3D emerged as software layers above the hardware, mainly because of industry support for a cross-hardware graphics library. Competition between the two rose as each game developer would choose either one or the other. In the early days of 3D accelerated gaming, most vendors did not supply a full OpenGL driver. The reason for this was twofold. Firstly, most of the consumer-oriented accelerators did not implement enough functionality to properly accelerate OpenGL. Secondly, many vendors struggled to implement a full OpenGL driver with good performance and compatibility. Instead, they wrote MiniGL drivers, which only implemented a subset of OpenGL, enough to run GLQuake (and later other OpenGL games, mostly based on the Quake engine). Proper OpenGL drivers became more prevalent as hardware evolved, and consumer-oriented accelerators caught up with the SGI systems for which OpenGL was originally designed. This would be around the time of DirectX 6 or DirectX 7. In the console world proprietary native APIs are dominant, with some consoles (e.g., the PS3) providing an OpenGL wrapper around its native API. The original Xbox supported Direct3D 8.1 as its native API while the Xbox 360 supports DirectX9 as its native API. Most console developers prefer to use the native APIs for each console to maximize performance, making OpenGL and Direct3D comparisons relevant for mostly PC platforms.


Mobile phones and other embedded devices

OpenGL for Embedded Systems, called
OpenGL ES OpenGL for Embedded Systems (OpenGL ES or GLES) is a subset of the OpenGL computer graphics rendering application programming interface (API) for rendering 2D and 3D computer graphics such as those used by video games, typically hardware-accele ...
, is a subset of the OpenGL 3D graphics API designed for embedded devices. Various versions of
smartphone A smartphone is a portable computer device that combines mobile telephone and computing functions into one unit. They are distinguished from feature phones by their stronger hardware capabilities and extensive mobile operating systems, whi ...
operating systems An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
support OpenGL ES, such as Android, iOS (
iPad The iPad is a brand of iOS and iPadOS-based tablet computers that are developed by Apple Inc., Apple Inc. The iPad was conceived before the related iPhone but the iPhone was developed and released first. Speculation about the development, ...
, iPhone,
iPod Touch The iPod Touch (stylized as iPod touch) is a discontinued line of iOS-based mobile devices designed and marketed by Apple Inc. with a touchscreen-controlled user interface. As with other iPod models, the iPod Touch can be used as a musi ...
),
Maemo Maemo is a software platform originally developed by Nokia, now developed by the community, for smartphones and Internet tablets. The platform comprises both the Maemo operating system and SDK. Maemo played a key role in Nokia's strategy to c ...
(
Nokia N900 The Nokia N900 is a smartphone made by Nokia. It supersedes the Nokia N810. Its default operating system, Maemo 5, is a Linux-based OS originally developed for the Nokia 770 Internet Tablet. It is the first Nokia device based upon the Texas ...
), and
Symbian Symbian is a discontinued mobile operating system (OS) and computing platform designed for smartphones. It was originally developed as a proprietary software OS for personal digital assistants in 1998 by the Symbian Ltd. consortium. Symbian OS ...
. OpenGL ES is available in 6 variants, OpenGL ES 1.0, 1.1, 2.0, 3.0, 3.1, 3.2. The release of 2.0 removed backward compatibility with older variants, due to the extensive programmable pipeline functions available in GL ES 2.0, over the fixed-pipeline functions of GL ES 1.0 and 1.1. OpenGL ES 3.0 needed new hardware over OpenGL ES 2.0, while OpenGL ES 3.1 is meant as a software update, needing only new drivers.
Direct3D Mobile Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardwar ...
, a Direct3D derivative, is supported by
Windows CE Windows Embedded Compact, formerly Windows Embedded CE, Windows Powered and Windows CE, is an operating system subfamily developed by Microsoft as part of its Windows Embedded family of products. Unlike Windows Embedded Standard, which is base ...
. Currently all
Windows Phone 7 Windows Phone 7 is the first release of the Windows Phone mobile client operating system, released worldwide on October 21, 2010, and in the United States on November 8, 2010. It runs on the Windows CE 6.0 kernel. It received multiple large upda ...
devices use a
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
UI accelerated by Direct3D Mobile 9 on Adreno 200/205 integrated GPUs by Qualcomm.
Windows Phone 8 Windows Phone 8 is the second generation of the Windows Phone mobile operating system from Microsoft Corporation, Microsoft. It was released on October 29, 2012, and, like its predecessor, it features a flat design, flat user interface based on t ...
implements Direct3D 11 (limited to feature level 9_3).http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj714072%28v=vs.105%29.aspx Shader model support for Windows Phone 8.


References


External links


OpenGL to be fully supported by Vista

MSDN library OpenGL

Eli asked about OpenGL, Direct Draw, and WPF, and how they work with Desktop composition...



Valve: OpenGL outpaces DirectX, even under Windows
{{DEFAULTSORT:Comparison Of Opengl And Direct3d Application programming interfaces DirectX Microsoft application programming interfaces OpenGL OpenGL and Direct3D