DirectX

 

DOS allowed direct access to video cards, keyboardsmicesound devices, and all other parts of the system, while Windows 95 – with its protected memory model – restricted access to all of these, working on a much more standardized model. Microsoft needed a quick solution for programmers; the operating system was only months away from being released. Eisler (development lead), St. John, and Engstrom (program manager) worked together to fix this problem, with a solution that they eventually named 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, such as Direct3DDirectDrawDirectMusicDirectPlayDirectSound, and so forth. The name DirectX was coined as shorthand term for all of these APIs (the X standing in for the particular API names) and soon became the name of the collection. When Microsoft later set out to develop a gaming console, the X was used as the basis of the name Xbox to indicate that the console was based on DirectX technology.[1] The X initial has been carried forward in the naming of APIs designed for the Xbox such as XInput and the Cross-platform Audio Creation Tool (XACT), while the DirectX pattern has been continued for Windows APIs such as Direct2D and DirectWrite.

Direct3D (the 3D graphics API within DirectX) is widely used in the development of video games for Microsoft WindowsMicrosoft Xbox, Microsoft Xbox 360 and some Sega Dreamcast games. Direct3D is also used by other softwareapplications for visualization and graphics tasks such as CAD/CAM engineering. As Direct3D is the most widely publicized component of DirectX, it is common to see the names “DirectX” and “Direct3D” used interchangeably.

The DirectX software development kit (SDK) consists of runtime libraries in redistributable binary form, along with accompanying documentation and headers for use in coding.

Starting with the release of Windows 8 Developer Preview, DirectX SDK has been integrated into Windows SDK.[3]

Direct3D 9Ex, Direct3D 10, and Direct3D 11 are only available for Windows Vista and newer because each of these new versions was built to depend upon the new Windows Display Driver Model that was introduced for Windows Vista. The new Vista/WDDM graphics architecture includes a new video memory manager supporting virtualization of graphics hardware for various applications and services like the Desktop Window Manager.

Direct3D was intended to be a lightweight partner to OpenGL, focused on game use. As 3D gaming grew, OpenGL evolved to include better support for programming techniques for interactive multimedia applications like games, giving developers choice between using OpenGL or Direct3D as the 3D graphics API for their applications. At that point a “battle” began between supporters of the cross-platform OpenGL and the Windows-only Direct3D. Incidentally, OpenGL was supported at Microsoft by the DirectX team. If a developer chose to use OpenGL 3D graphics API, the other APIs of DirectX are often combined with OpenGL in computer games because OpenGL does not include all of DirectX’s functionality (such as sound or joystick support).

In a console-specific version, DirectX was used as a basis for Microsoft’s Xbox and Xbox 360 console API. The API was developed jointly between Microsoft and Nvidia, who developed the custom graphics hardware used by the original Xbox. The Xbox API is similar to DirectX version 8.1, but is non-updateable like other console technologies. The Xbox was code named DirectXbox, but this was shortened to Xbox for its commercial name.[9]

DirectX 11.1 is included in Windows 8. It supports WDDM 1.2 for increased performance, features improved integration of Direct2DDirect3D, and DirectCompute, and includes DirectXMath, XAudio2, and XInput libraries from the XNA framework. It also features stereoscopic 3Dsupport for gaming and video.[39]

There are alternatives to the DirectX family of APIs, with Mantle and OpenGL having the most features. Examples of other APIs include SDLAllegroOpenMAXOpenMLOpenALOpenCLFMOD, Mantle, SFML, etc. Many of these libraries are cross-platform or have open codebases.

 

DirectX

 

http://en.wikipedia.org/wiki/DirectX

DOS allowed direct access to video cards, keyboardsmicesound devices, and all other parts of the system, while Windows 95 – with its protected memory model – restricted access to all of these, working on a much more standardized model. Microsoft needed a quick solution for programmers; the operating system was only months away from being released. Eisler (development lead), St. John, and Engstrom (program manager) worked together to fix this problem, with a solution that they eventually named DirectX.

The first version of DirectX was released in September 1995 as the Windows Games SDK. It was the Win32 replacement for the DCI[4] and WinG APIs for Windows 3.1. DirectX allowed all versions of Microsoft Windows, starting with Windows 95, to incorporate high-performance multimedia.

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, such as Direct3DDirectDrawDirectMusicDirectPlayDirectSound, and so forth. The name DirectX was coined as shorthand term for all of these APIs (the X standing in for the particular API names) and soon became the name of the collection. When Microsoft later set out to develop a gaming console, the X was used as the basis of the name Xbox to indicate that the console was based on DirectX technology.[1] The X initial has been carried forward in the naming of APIs designed for the Xbox such as XInput and the Cross-platform Audio Creation Tool (XACT), while the DirectX pattern has been continued for Windows APIs such as Direct2D and DirectWrite.

Direct3D (the 3D graphics API within DirectX) is widely used in the development of video games for Microsoft WindowsMicrosoft Xbox, Microsoft Xbox 360 and some Sega Dreamcast games. Direct3D is also used by other softwareapplications for visualization and graphics tasks such as CAD/CAM engineering. As Direct3D is the most widely publicized component of DirectX, it is common to see the names “DirectX” and “Direct3D” used interchangeably.

The DirectX software development kit (SDK) consists of runtime libraries in redistributable binary form, along with accompanying documentation and headers for use in coding. Originally, the runtimes were only installed by games or explicitly by the user. Windows 95 did not launch with DirectX, but DirectX was included with Windows 95 OEM Service Release 2.[2] Windows 98 and Windows NT 4.0 both shipped with DirectX, as has every version of Windows released since. The SDK is available as a free download. While the runtimes are proprietary, closed-source software, source code is provided for most of the SDK samples. Starting with the release of Windows 8 Developer Preview, DirectX SDK has been integrated into Windows SDK.[3]

Direct3D 9Ex, Direct3D 10, and Direct3D 11 are only available for Windows Vista and newer because each of these new versions was built to depend upon the new Windows Display Driver Model that was introduced for Windows Vista. The new Vista/WDDM graphics architecture includes a new video memory manager supporting virtualization of graphics hardware for various applications and services like the Desktop Window Manager.

 

Prior to DirectX, Microsoft had included OpenGL on their Windows NT platform.[8] At the time, OpenGL required “high-end” hardware and was focused on engineering and CAD uses.[citation needed] Direct3D was intended to be a lightweight partner to OpenGL, focused on game use. As 3D gaming grew, OpenGL evolved to include better support for programming techniques for interactive multimedia applications like games, giving developers choice between using OpenGL or Direct3D as the 3D graphics API for their applications. At that point a “battle” began between supporters of the cross-platform OpenGL and the Windows-only Direct3D. Incidentally, OpenGL was supported at Microsoft by the DirectX team. If a developer chose to use OpenGL 3D graphics API, the other APIs of DirectX are often combined with OpenGL in computer games because OpenGL does not include all of DirectX’s functionality (such as sound or joystick support).

In a console-specific version, DirectX was used as a basis for Microsoft’s Xbox and Xbox 360 console API. The API was developed jointly between Microsoft and Nvidia, who developed the custom graphics hardware used by the original Xbox. The Xbox API is similar to DirectX version 8.1, but is non-updateable like other console technologies. The Xbox was code named DirectXbox, but this was shortened to Xbox for its commercial name

.NET Framework[edit]

In 2002, Microsoft released a version of DirectX compatible with the Microsoft .NET Framework, thus allowing programmers to take advantage of DirectX functionality from within .NET applications using compatible languages such as managed C++ or the use of the C# programming language. This API was known as “Managed DirectX” (or MDX for short), and claimed to operate at 98% of performance of the underlying native DirectX APIs.

No Microsoft product including the latest XNA releases provides DirectX 10 support for the .NET Framework.

The other approach for DirectX in managed languages is to use third-party libraries like SlimDX for Direct3D. SharpDX, DirectInput (including Direct3D 10), Direct Show .NET for DirectShow subset or Windows API CodePack for .NET Framework which is an open source library from Microsoft.

Alternatives[edit]

This section requires expansion.(September 2010)

There are alternatives to the DirectX family of APIs, with OpenGL having the most features. Examples of other APIs include SDLAllegroOpenMAXOpenMLOpenALOpenCLFMOD, SFML, etc. Many of these libraries are cross-platform or have open codebases.

There are also alternative implementations that aim to provide the same API, such as the one in Wine.

The developers of ReactOS are trying to reimplement DirectX under the name “ReactX”.

 

OpenGL

OpenGL (Open Graphics Library)[2] is a cross-languagemulti-platform application programming interface (API) for rendering 2D and 3D computer graphics. The API is typically used to interact with a Graphics processing unit (GPU), to achieve hardware-accelerated rendering.

OpenGL was developed by Silicon Graphics Inc. (SGI) from 1991 and released in January 1992[3] and is widely used in CADvirtual realityscientific visualization, information visualization, flight simulation, and video games. OpenGL is managed by the non-profit technology consortium Khronos Group.

The OpenGL specification describes an abstract API for drawing 2D and 3D graphics. Although it’s possible for the API to be implemented entirely in software, it’s designed to be implemented mostly or entirely in hardware.

The API is defined as a number of functions which may be called by the client program, alongside a number of named integer constants (for example, the constant GL_TEXTURE_2D, which corresponds to the decimal number 3553). Although the function definitions are superficially similar to those of the C programming language, they are language-independent. As such, OpenGL has many language bindings, some of the most noteworthy being the JavaScript binding WebGL (API, based on OpenGL ES 2.0, for 3D rendering from within a web browser); the C bindings WGLGLX and CGL; the C binding provided by iOS; and the Java and C bindings provided by Android.

In addition to being language-independent, OpenGL is also platform-independent. The specification says nothing on the subject of obtaining, and managing, an OpenGL context, leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is purely concerned with rendering, providing no APIs related to input, audio, or windowing.

OpenGL’s popularity is partially due to the quality of its official documentation. The OpenGL Architecture Review Board released a series of manuals along with the specification which have been updated to track changes in the API. These are almost universally known by the colors of their covers

In the 1980s, developing software that could function with a wide range of graphics hardware was a real challenge. Software developers wrote custom interfaces and drivers for each piece of hardware. This was expensive and resulted in much duplication of effort.

By the early 1990s, SGI was a leader in 3D graphics for workstations. Their IRIS GL API[10] was considered state-of-the-art and became the de facto industry standard, overshadowing the open standards-based PHIGS. This was because IRIS GL was considered easier to use, and because it supported immediate mode rendering. By contrast, PHIGS was considered difficult to use and outdated in terms of functionality.

SGI’s competitors (including Sun MicrosystemsHewlett-Packard and IBM) were also able to bring to market 3D hardware, supported by extensions made to the PHIGS standard. This in turn caused SGI market share to weaken as more 3D graphics hardware suppliers entered the market. In an effort to influence the market, SGI decided to turn the IrisGL API into an open standard – OpenGL.

One of the restrictions of IrisGL was that it only provided access to features supported by the underlying hardware. If the graphics hardware did not support a feature, then the application could not use it. OpenGL overcame this problem by providing support in software for features unsupported by hardware, allowing applications to use advanced graphics on relatively low-powered systems. OpenGL standardized access to hardware, pushed the development responsibility of hardware interface programs (sometimes called device drivers) to hardware manufacturers, and delegated windowing functions to the underlying operating system. With so many different kinds of graphics hardware, getting them all to speak the same language in this way had a remarkable impact by giving software developers a higher level platform for 3D-software development.

http://en.wikipedia.org/wiki/OpenGL

Most graphics libraries such as OpenGL provide an abstract graphical device model as an interface. The library is responsible for translating the commands provided by the programmer into the specific device commands needed to draw the graphical elements and objects. The specific device commands for a plotter are different from the device commands for a CRT monitor but the graphics library hides the implementation and device dependent details by providing an abstract interface which provides a set of primitives that are generally useful for drawing graphical objects.

http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D