rajat22
In the zone
Just what is DirectX?
Source *www.d-silence.com/
Author: Mungler
Editor: Agi
Source *www.d-silence.com/
Author: Mungler
Editor: Agi
Source *www.d-silence.com/With the recent release of version 9.0c, DirectX once again takes its place in the spotlight. I
thought I would use this occasion to review what makes DirectX tick.
It also occurred to me the other day that DirectX, and it's various versions, has a great impact
on many aspects of Windows computing...affecting much more than just our gaming experience and
yet, has managed to stay quite low on most user's radar.
What is DirectX?
DirectX is a set of multimedia Application Programming Interfaces (API's) written by Microsoft.
It is a collection of Dynamic Link Libraries (DLLs) that contain functions useful to a wide range
of multimedia programmers, but are all almost entirely platform independent. This allows
programmers access to fast graphics, sound, and input functions while not needing their apps to
test for the capabilities of the computer on which their program is running. DirectX will
evaluate these capabilities and if they are not present, DirectX may attempt (in many cases) to
emulate the functions in software instead of hardware.
*www.d-silence.com/articles/graphics/directx/directx.jpg
Back in the height of DOS, people like game developers had direct access to the hardware for
which they were developing. With complete access to interrupts, sound cards, input devices, and
the VGA controller, the developers could usually make the hardware do anything they could dream
up. The release of Windows 3.1 did not tempt developers because of the massive overhead that came
along with it for game development. However, DOS had its own problems.
*www.d-silence.com/articles/graphics/directx/old_dos.jpg
Hardware device support in DOS became a complicated nightmare. As the desktop computer became
more and more popular with the average household, more hardware competition developed, giving
rise to hundreds of different posible PC configurations. With the skyrocketing number of
configurations to code for, more development time was being spent programming support for the
hardware, which left less and less time in the project plans for programming the games
themselves!! Fortunately, that was about to change.
[Ed. Note - How many gamers remember how difficult it was to get things like soundcards working
in DOS games? Fooling around with IRQ's and DMA channels was an exercise in frustration. Or how
about memory allocation? Working with EMM/XMS could be equally frustrating.]
With the usual promises of something new, different and better, Microsoft unleashed Windows 95
into the world. Windows 95 had many new things to offer over and above its DOS-based predecessor.
“Plug and Play� was introduced in an attempt to make it simple for the average PC user to install
the latest hardware. The resource-handling system was completely revamped to make device
management easier and device independence more of an actual reality. Unfortunately, Windows 95
lacked the necessary performance enhancements to sway developers interest in the Windows 95
Platform. Consequently, many games ran in a DOS mode or required a reboot of the PC so that they
could start up their own DOS-like system. DirectX set out to change all this.
*www.d-silence.com/articles/graphics/directx/win95.jpg
With the recent release of version 9.0c, DirectX once again takes its place in the spotlight. I
thought I would use this occasion to review what makes DirectX tick.
It also occurred to me the other day that DirectX, and it's various versions, has a great impact
on many aspects of Windows computing...affecting much more than just our gaming experience and
yet, has managed to stay quite low on most user's radar.
What is DirectX?
DirectX is a set of multimedia Application Programming Interfaces (API's) written by Microsoft.
It is a collection of Dynamic Link Libraries (DLLs) that contain functions useful to a wide range
of multimedia programmers, but are all almost entirely platform independent. This allows
programmers access to fast graphics, sound, and input functions while not needing their apps to
test for the capabilities of the computer on which their program is running. DirectX will
evaluate these capabilities and if they are not present, DirectX may attempt (in many cases) to
emulate the functions in software instead of hardware.
Back in the height of DOS, people like game developers had direct access to the hardware for
which they were developing. With complete access to interrupts, sound cards, input devices, and
the VGA controller, the developers could usually make the hardware do anything they could dream
up. The release of Windows 3.1 did not tempt developers because of the massive overhead that came
along with it for game development. However, DOS had its own problems.
Hardware device support in DOS became a complicated nightmare. As the desktop computer became
more and more popular with the average household, more hardware competition developed, giving
rise to hundreds of different posible PC configurations. With the skyrocketing number of
configurations to code for, more development time was being spent programming support for the
hardware, which left less and less time in the project plans for programming the games
themselves!! Fortunately, that was about to change.
[Ed. Note - How many gamers remember how difficult it was to get things like soundcards working
in DOS games? Fooling around with IRQ's and DMA channels was an exercise in frustration. Or how
about memory allocation? Working with EMM/XMS could be equally frustrating.]
With the usual promises of something new, different and better, Microsoft unleashed Windows 95
into the world. Windows 95 had many new things to offer over and above its DOS-based predecessor.
“Plug and Play� was introduced in an attempt to make it simple for the average PC user to install
the latest hardware. The resource-handling system was completely revamped to make device
management easier and device independence more of an actual reality. Unfortunately, Windows 95
lacked the necessary performance enhancements to sway developers interest in the Windows 95
Platform. Consequently, many games ran in a DOS mode or required a reboot of the PC so that they
could start up their own DOS-like system. DirectX set out to change all this.
The seemingly simple goal of making Microsoft Windows a desirable platform for multimedia
development turned out to be a much greater undertaking than MS probably first thought. It was
quickly determined that in order to provide the performance needed, DirectX would need to operate
through fast, low-level libraries that allowed the developer to maintain creative freedom over
their code.
The next item on the DirectX developers list was to shift the burden of hardware support from the
multimedia developer to the hardware manufacturers. This makes much more sense, as hardware
manufacturers are more qualified to write the drivers for their products than any application
developer. This approach also helped to unify the standard for technology drivers, keeping the
essential compatibility aspects in the forefront for all kinds of additional PC components.
Another feature of DirectX is the capability of DirectX applications to run side by side with non
DirectX applications without causing any system problems. Lastly, DirectX would have the
performance that was capable in DOS while meeting all the other specifications.
*www.d-silence.com/articles/graphics/directx/DirectX1.jpg
What does DirectX do.
DirectX provides a key set of tools and commands to enhance games and other multimedia
applications allowing the hardware and the software to "talk" to each other with much greater
ease. The API gives multimedia applications greater access to the advanced features of
high-performance hardware such as three-dimensional (3D) graphics acceleration chips and uber
sound cards. They also control many other lower-level functions; this includes two-dimensional
(2D) graphics acceleration; support for the wide range of input devices such as
joysticks/joy-pads, keyboards, mice, controls sound mixing and sound output on a vast range of
audio hardware, controls networking and multiplayer gaming, and control over various multimedia
streaming formats. With each new revision, more feature support is added for emerging technology
so that developers can begin to use that new technology as soon as possible, and hopefully,
bringing the technology to us sooner.
Major Components
The following are the major components (with their related function) that make up DirectX:
DirectDraw - 2D Graphics
Direct3D - 3D Graphics
DirectSound - 2D Sound
DirectSound3D - 3D Sound
DirectMusic - Music
DirectPlay - Network/Multiplayer
DirectInput - Input Devices
Do I need DirectX?
If you play almost any game on a Windows98 or later machine, then you will more than likely be
using or will require some component of DirectX. Fortunately, if applications require a certain
version of DirectX then they will invariably come with the appropriate DirectX installer on the
software CD, guaranteeing that you have the required version in order to run the application or
play the game. But that's not everything. You can upgrade your version of DirectX even if you
don’t actually need it. By doing so, you will implement the latest version of the API’s, which
may contain bug fixes and optimizations for certain parts of many programs. This could,
theoretically, give you better performance in your game of choice, a better quality of sound for
your music or make streaming media play more smoothly. Also, by installing the latest version of
DirectX, you may unlock a previously unused feature of your super-duper graphics card (Pixel
shader 3.0 in Far-Cry for instance). But you may also need to get later drivers for your sound
card, etc, in order to start using the new features to their full extent.
Now I want it, where do I get it?
Windows 95, Windows 98, Windows 98 SE, Windows Millennium Edition (Windows Me), Windows 2000,
Windows Server 2003, and Windows XP all have support for DirectX. However, the highest version of
DirectX that Windows 95 can use is version 8.0a. For everyone else, you
can go right up to the latest released version (9.0c). What about NT
though? DirectX is also available for windows NT4.0 as part of Service pack 6. Although why you
want to run this OS with multimedia applications is a bit of a mystery to me
After installation some drivers show up as not certified. What’s wrong?
Driver updates from hardware vendors have to be submitted to Microsoft where they undergo a
series of tests before being certified (WHQL). However, sometimes the vendor may simultaneously
release the updates to the general public and MS without waiting for certification. Such drivers
may offer DirectX functionality but won’t be certified. So, before installing new drivers, you
may want to check for DirectX compatibility in the vendor’s release notes.
How do I uninstall DirectX?
DirectX is a Windows system component and as with so many Windows system components (like MSN
messenger), once it’s on your computer, you will have a very hard time getting it off again. So
if it goes wrong or anything like that, you are a bit stuck. Thankfully there are some options.
Later versions of windows OS have System Restore points. It is always a good idea to make a
System Restore point when installing new drivers or other things like DirectX. Also, there is the
DirectX diagnostic tool. Unfortunately, Microsoft doesn’t tell you where it is when you install
DirectX, no icon is placed in the control panel or in the start menu listings. To get to it, you
have to find it (\windows\system32\dxdiag.exe). The diagnostic tool allows you to control various
aspects of the DirectX API (turn them on, off, up, down, etc.) and it’s also handy to find out
what version of DirectX you are currently running. There are also third-party DirectX
"uninstallers" around, however trying to uninstall DirectX could trash your box.
What is to come in the future?
At the moment, the latest version of DirectX is version 9.0c. This version has added support for things like Shader Model 3.0, demonstrated here on HardOCP. Soon, more and more games will feature the various enhancements of 9.0c.
The next major release of DirectX will bring about even more changes. Microsoft is going to unify the graphical API's of DirectX under the new name of the Windows Graphics Foundation and Avalon, which is planned for release with the new Longhorn version of Windows. DirectX should still exist, but only in name and only for the remaining core components. This means that the next generation of Graphics cards will no longer say that they are DirectX compatible, but instead will be supporting WGF1.0 (or something similar to that). At this time, it is not known if any other portion of DirectX is going to splinter off to form it's own "club." Functions of your controllers and sound cards will still be under the control of the main set of DirectX API's, but Longhorn is still a way off yet and things may change between now and then.
Final Thoughts
While something like OpenGL and the now ancient Glide (3dfx) are graphics only API's, DirectX is a collection of functions that govern sound, video, network communications as well as the commands for your graphics and sound cards or allowing you to bind a key to the twenty fifth button on your mouse. Giving greater levels of compatibility between new hardware and old games graphics. DirectX performs the vital function of interpreting the instructions from software into (and also old hardware with new games). DirectX's chief advantage comes from providing all of these functions while remaining almost completely invisible to the end user.