Category: 

What Are the Differences between OpenGL® and Direct3D?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 24 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Helium is the only element that was discovered in space before it was found on Earth.  more...

December 10 ,  1948 :  The UN adopted the Universal Declaration on Human Rights.  more...

There are several differences between the Open Graphics Library® (OpenGL®) and Direct3D computer graphics libraries, although not all of them are obvious to programmers and end users. The largest difference is in how each of the graphics libraries is developed and maintained, with OpenGL® being developed largely by a consortium of different interested parties, and Direct3D being developed and maintained by Microsoft®. Direct3D also is completely proprietary in its implementation, while OpenGL® follows a largely open standard, with the exception of some patented hardware routines. The final major difference between the OpenGL® and Direct3D libraries is found in their supported platforms, because OpenGL® works on a variety of platforms and languages, while Direct3D works only on Microsoft® Windows®-based systems.

In the early to mid-1990s, when both OpenGL® and Direct3D became available to computer programmers, there was a large difference in the underlying frameworks. As time progressed and graphical hardware became more prevalent and less expensive, many advanced features were introduced that both libraries needed to support to remain relevant. Eventually, the perceived competition between OpenGL® and Direct3D led to both libraries having almost identical abilities, although some minor differences still exist. Most end users are not aware of whether OpenGL® or Direct3D is used in a device or application, and a large amount of 3D programs actually contain support for both libraries.

Ad

One of the largest and most unavoidable differences between OpenGL® and Direct3D is the platforms on which they will operate. Direct3D is part of the Microsoft® Windows® software development kit (SDK), so it specifically relies on components that are found only in the Windows® operating system and its derivatives. OpenGL®, on the other hand, is developed generically to be cross-platform and relies as little as possible on operating specific functions. Some programs have been developed to allow Direct3D to work on operating systems outside Windows®, although the functionality usually is greatly reduced.

From a programming perspective, there is an overall design difference between the libraries. OpenGL® tends to abstract the use of graphics hardware, allowing programmers to use a core set of functions for drawing that then relies on drivers to directly access the hardware. Direct3D requires the programmer to manage certain aspects of the hardware within the program being written, which can make a Direct3D program more complex but also provides more flexible resource management. Ultimately, OpenGL® is easier to write programs with but more difficult for hardware manufacturers to write drivers for. Alternately, Direct3D has a large amount of tools and support available from Microsoft® but requires more hardware and programming knowledge to use.

A final difference between OpenGL® and Direct3D is the way in which new hardware and language features are added between major standard releases. Through OpenGL®, hardware manufacturers are able to implement special functions known as extensions that can provide immediate access to unique features of new hardware. With Direct3D, these features need to be processed through Microsoft®, which then releases the new functions through official distribution channels. The OpenGL® approach allows new features to be used quickly but reduces the overall compatibility of a program using the extensions, while the Direct3D approach is slower but can guarantee compatibility across different systems.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email