DirectX

Created
Tags

Overview

DirectX is a set of APIs from Microsoft for applications and games on Windows and Xbox systems.

DOS

DOS allowed direct access to video cards, sound devices, input devices and other components of the system.

High performance DOS games used blitting and page flipping with direct access to video memory.

GDI

The Graphics Device Interface (GDI) is the original graphics interface for 16-bit Windows.

Windows 3.x had several problems to enable high performance applications.

GDI+

GDI+ was introduced in Windows XP as a successor to GDI.

GDI+ is a C++ API with a few additional features but the same limitations regarding direct access to video memory.

The .NET Framework also provides a managed version of GDI+.

WinG

To fix the issues with GDI, Microsoft released the WinG library on September 1994.

WinG used the Device Control Interface (DCI) driver that exists at the same software layer as the GDI to exploit the video acceleration features of graphic cards.

WinG introduced a new type of DC called the WinGDC and a new type of DIB called WinGBitmaps.

WinG allowed reading and writing directly to memory and fast transfers to the display device.

💡
The WinGBitmap scan lines are aligned on 32-bit boundaries.

Windows 95

Windows NT 3.5 and Windows 95 introduced CreateDIBSection to support creating DCs based on DIBs.

However, Windows 95 had a protected memory model that restriced access to the hardware.

Game SDK

The first version of DirectX was called Windows 95 Game SDK or Game SDK.

It was announced in March 1995 at CGDC.

It was released on September 1995.

It supported Windows 95.

The libray provided four set of APIs:

COM

DirectX is composed of interfaces based on the Component Object Model (COM).

Each interface supports a set of functions.

💡
A COM interface is like a pure abstract base class in C++.

DirectDraw

DirectDraw is a Hardware Abstraction Layer (HAL).

DirectDraw can emulate hardware functionality in software using its Hardware Emulation Layer (HEL).

DirectDraw provides a memory manager for video memory. Memory can be allocated, moved, transformed, and freed.

An image in video memory is referred to as a surface.

💡
Maintains compatibility with Windows GDI.
⚠️
Display modes are limited to a 640-by-480 resolution with pixel depths of 8-bpp and 16-bpp.

DirectSound

DirectSound provides hardware acceleration (HAL).

DirectSound can emulate hardware functionality in software using the Windows waveform audio functions (HEL).

DirectSound supports uncompressed PCM formats.

⚠️
DirectSound does not support compressed wave formats.

DirectInput

DirectInput only provides support for joysticks.

The Windows API provided limited support for joysticks using the joyGetPos function:

DirectInput added an extended function: joyGetPosEx:

DirectPlay

DirectPlay is a high-level software interface between applications and communication services.

DirectPlay is built on the User Datagram Protocol (UDP).

DirectX 2

It was announced in April 1996 at CGDC.

It was released on June 1996.

A minor revision was released: DirectX 2.0a.

It supported Windows 95 OSR2 and Windows NT 4.0.

Direct3D

DirectDraw

DirectInput

Keyboard and mouse are provided as wrappers to the Windows API.

Support for up to 16 joysticks, each with up to six axes of movement and up to 32 buttons.

DirectX 3

It was released on September 1996.

Two minor revisions were released: DirectX 3.0a and 3.0b.

DirectInput

DirectX 4

It was planned for December 1996 with special features for Cirrus Logic chips.

The released was skipped because of the delay of the chips.

DirectX 5

It was released on July 1997.

It supported Windows 98.

DirectX 5.2 was released for:

It included:

DirectInput

DirectX 6

It was released on August 1998.

It was released as Windows CE on the Sega Dreamcast.

The introduction of DirectMusic was delayed.

DirectX 6.1

It was released on February 1999.

A minor revision, DirectX 6.1a was released on May 1999 for Windows 98 SE.

DirectX 7

It was released in 1999.

A version for Windows 2000 was released on February 2000.

A minor revision, DirectX 7.0a was released on March 2000.

DirectX 7.1

It was released on September 2000.

It required at least Windows ME.

DirectX 8

It was released in 2000.

A minor revision, DirectX 8.0a was released on February 2001.

Direct3D

DirectX 8.1

It was released on November 2001.

It required at least Windows 98 and Windows 2000.

Two minor revisions, DirectX 8.1a and 8.1b were released in 2002.

The Xbox system was based on DirectX 8.1.

DirectX 8.2

It was released in late 2002.

It included DirectPlay 8.2.

DirectX 9

It was released on December 2002.

The original release supported Windows 98 and Windows XP.

The February 2005 release is the released with support for 64-bit systems.

The last update was DirectX 9.0c.

The April 2006 release added support for Windows Vista and required at least Windows XP or Windows 2000.

The Xbox 360 system was based on the 2008 release.

The August 2009 release added support for Windows 7.

Direct3D

XInput

⚠️
DirectInput has limited support for the Xbox 360 and Xbox One controllers.
⚠️
XInput has limited support for legacy Windows controllers.

Managed DirectX

Managed DirectX (MDX) 1.1 was introduced in 2002.

MDX 2.0 was in beta from 2005 but was cancelled in 2006.

XNA Framework

XNA was announced on March 2004 at GDC.

A first Community Technology Preview of XNA Build was released on March 2006.

The first beta version of XNA Game Studio Express was released on August 2006, followed by a second version on November 2006.

XNA Game Studio Express was released on December 2006.

XNA Game Studio Express 1.0 Refresh was released on April 2007.

XNA Game Studio 2.0 was released in December 2007.

A beta of XNA Game Studio 3.0 was released on September 2008.

XNA Game Studio 3.0 was released on October 2008.

XNA Game Studio 3.1 was released on June 2009.

XNA Game Studio 4.0 "Community Technical Preview" was released on March 2010.

XNA Game Studio 4.0 was released on September 2010.

XNA Game Studio 4.0 Refresh was released on October 2011.

XDK Extensions was available with the Xbox 360 Development Kit for licensed developers.

In 2013, the development of XNA was discontinued.


XNA Framework is based on the native implementation of .NET Compact Framework 2.0 for Xbox 360 development and .NET Framework 2.0 on Windows.

XNA is available on Windows XP, Windows Vista, Windows 7, Windows Phone and Xbox 360.

DirectX 10

It was released in November 2006.

It required Windows Vista.

DirectX 10.1 was released on February 2008 and added support for Windows Server 2008.

Direct3D 10.1 introduced feature levels and Shader Model 4.1.

Added support for:

DirectX 11

It was released in October 2009.

DirectX 11.1 was released on August 2012.

DirectX 11.2 was released on October 2013.

The Xbox One system is based on DirectX 11.2.

DirectX 11.3 was released with DirectX 12.

It added support for:

DirectX 12

It was announced on March 2014 at GDC.

It was released in July 2015.

It requires Windows 10.

DirectX 12 is also featured on Xbox One.