Before therelease of Windows 95, most games were released for the DOS platform, usuallyusing something like DOS4GW or some other 32-bit DOS extender to obtain accessto 32-bit protected mode. Windows 95, however, seemed to signal the beginningof the end of the DOS prompt. Games developers began to wonder how they weregoing to write games optimally that would run under Windows 95 - gamestypically need to run in full-screen mode, and need to get as close as possibleto your hardware. Windows 95 seemed to be getting in the way ofthis. DOS had allowed them to program as close to the metal aspossible, that is, get straight to the hardware, without going through layersof abstraction and encapsulation. In those days, the extra overhead of ageneric API would have made games too slow.So Microsoft'sanswer to this problem was a Software Development Kit (SDK) called DirectX.DirectX is a poorly-designed, poorly-documented API (Application ProgrammingInterface). It was originally purchased from a London company called RenderMorphics, andquietly released more or less as is as DirectX 2. DirectX 3 was probably thefirst serious release by Microsoft, who had now begun to activelypush it as the games programming API of the future. Being the biggest softwarecompany on the planet, and being the developers of the Operating System thatsome 90% of desktop users were using, they succeeded. Hardware vendors quicklyrealised that following the Microsoft lead was the prudent thing to do, andeveryone began to produce DirectX drivers for their hardware. In many ways thiswas a good thing for game developers.
The currentversion is DirectX 9. C lot of improvements have been made to the originalDirectX. For example, the documentation doesn't suck as much as it originallydid. Some of the poorly designed sections of the original API have been cleanupup and improved. Some of the really poorly designed sections of the originalAPI have been removed. One of the mainpurposes of DirectX is to provide a standard way of accessing many differentproprietary hardware devices. For example, Direct3D provides a standard programming interface that can be used to access the 3Dhardware acceleration features of almost all 3D cards on the market which haveDirect3D drivers written for them. In theory this is supposed to make itpossible for one application to transparently run as it is supposed to across awide variety of different hardware configurations. In practice, it usuallyisn't this simple. One of thereasons it isn't that simple, is that hardware (such as 3D graphicsaccelerators) normally only support a subset of the features available inDirectX, and you don't really want to use a feature if it isn't available insome sort of hardware accelerated form. To find out which features areavailable you have to query a device for a list of capabilities, and there canbe many of these.