Thursday, June 18, 2009

WINXP - DirectX Overview

This is an overview of DirectX and how it works. This is a quick-and-dirty summary, not exact.

First see the Wikipedia article at link above.

Under normal scenario, this is how software communicates with your video card:

Software <--> CPU <--> Video_Card_Drivers <--> Video_Card_hardware

Now, DirectX is essentially a set of drivers that supplement your Video_Card_Drivers, and work like this:

Software <--> Video_Card_Drivers_+_DirectX <--> Video_Card_hardware

The first thing you should notice is the use of the CPU (resources) is skipped. This is equivalent to what DMA (aka Direct Memory Access) does for memory.

Since drivers are memory resident, execution of any code/command is faster.

In addition, NOT using the CPU for video frees-up CPU resources for other tasks. Example, in games, the CPU can devote more resources to running the game-AI. Therefore software runs better, faster and smoother. This applies to ALL software that can use DirectX.

Note the qualifier. The software must be capable of using DirectX, otherwise the "normal scenario" is used.

Some software (especially games) MAY require DirectX. This is because the game's writers do not have to include the bulky code required to run in the "normal scenario" thereby having a lean-and-mean game.

IN ADDITION: Whatever video card you use MUST be able to support DirectX. Not all do.

Because of this, if you have "DirectX required" software, you MUST have a DirectX video card.

No comments: