Learning about DirectX Compatibility

Developers generally have a good understanding of their system. However, it's still important to use the correct tool to check your system for compatibility concerns, yet the Microsoft documentation is a little light in this area. Fortunately, all you really need to know is where to look for the information and then understand what to do with the information you find.

The first step to check system compatibility is to start the DirectX diagnostic utility. You won't find it on your Start menu. Open the Run dialog box, type DXDIAG, and click OK. You'll see a DirectX Diagnostic Tool dialog box like the one shown in Figure 13.1. Note that the DirectX Diagnostic Tool will display a progress bar as it checks the capabilities of your system, the drives, and the version of DirectX installed.

The first setting I always check is the DirectX Version entry near the bottom of the dialog box. You need to go to the DirectX Web site (http://www.microsoft.com/directx/default_.asp) to verify this version number against the current version that Microsoft supports. If you see that the Web site contains a newer version, download it, install it, and restart your machine. Using the most current version ensures that anything you develop will have the latest features. In addition, using the most current version generally ensures that you'll run into fewer bugs during your development experience.

Note The most current version of DirectX available as of this writing is version 8.1. However, this update concentrates on 3D drawing and many of you will still need to perform 2D drawing. Visual Studio .NET ships with DirectX 7 support, which excels at 2D drawing, so the examples in this chapter and Chapter 14 will use DirectX 7. I also tested these examples using DirectX 8.1. All of the 3D and extended examples in Chapters 15 and 16 were written and tested using DirectX 8.1 but should run on newer versions of DirectX as well. To use the examples in Chapters 15 and 16, you must download the latest DirectX SDK from http://www.microsoft.com/directx/default.asp.

Notice the Next Page button at the bottom of the screen in Figure 13.1. You'll find a button like that one on most of the DirectX tabs. What the button doesn't tell you is that clicking it runs a test on your system. Try clicking it now and you'll advance to the DirectX Files tab. If you see No Problems Found in the Notes section, you know that test passed.

Click Next Page again and you'll advance to the Display tab. The same success or failure message will appear in the Notes field again. However, this time you'll also see some diagnostic buttons, as shown in Figure 13.2. For example, you can disable Direct3D Acceleration by clicking the associated Disable button. Before you cripple your system, however, you'll want to test its compatibility with DirectX. Click Test DirectDraw and the DirectX Diagnostic Tool will perform extended tests on your system. If everything goes well, click Test Direct3D. These tests will verify that your display adapter can work with DirectX and therefore any application produced on your system. If you do run into problems, the DirectX Diagnostic Tool normally provides enough information for you to fix the problem yourself or ask intelligent questions of a support person. In some cases, you have to disable a hardware acceleration feature to gain true compatibility.

X DirectX Ougruntk Toot

Staeel DmaXtta &ectt> Sara Mac Iw Nero«* MenHefe

Otwe Often

Hen* ATI TeOrttojei he 30 RAGE PRO Hi

n Over

Man/eduw ATI Teetadeeee he


i 01 ¿453 OCOT ¡Engtahl






tarn T«IMtmr, 8CUB


Cuwl Duplay MM* nS2>aC4(l«b<)teOHi)

Marker Geneec Talrwawn



EndJOtaM»' 1 OwM» |


AGP Twue AcoMMo I CeetH |


• Toieet CwaCw*»*e«oni») "f OnaDw tutt* ibmt |* Teleet Dnd30hmionrirf ddtltie'Tm CMel30'bLeonifc«>e


Help J | WPv | f SeMJIHa


Figure 13.2: Some of the DirectX tabs contain special test buttons you can use to check compatibility.

Follow the Next Page and testing process until you get to the More Help tab. If everything passes, at this point, your system is completely compatible with DirectX. Of course, there are differing levels of hardware capability, so you also need to consider how much DirectX support your system provides. For example, you might find that your sound card doesn't provide default port acceleration. If this feature is missing, you won't be able to use it in your application.

Tip Sometimes you'll want to disable a hardware feature for reasons other than compatibility. For example, you might want to see how an application works with software emulation rather than the faster hardware support. Disabling the hardware support helps you to check the software emulation. In other cases, you might want to disable a hardware feature to see how a program will react on a less capable machine. Bugs might not show up until you have disabled some of the hardware functionality your machine provides. Some of the tabs also contain sliders that you can use to control features such as hardware acceleration. Choosing a lower amount of acceleration can often help in diagnosing subtle DirectX problems.

After you complete all of your tests, you can click the Save All Information button to display a Save As dialog box. The DirectX Diagnostic Tool can save all of the test results and other information about your system as a text file. Maintaining a copy of this text file helps you track your system in its ideal state and compare it to results you get during later tests. Performing a comparison can help you locate potential problems caused by system degradation.

Was this article helpful?

0 0

Post a comment