DirectX SDK |
This section pertains only to application development in Visual Basic. See Direct3D Immediate Mode C/C++ Tutorials.
Device enumeration is useful because it allows applications to query hardware for the Direct3D devices that the hardware supports. As a result, you can build applications that take advantage of particular hardware configurations, or you can let the user choose a particular configuration supported by their system's hardware. The Using Device Enumeration tutorial enumerates the drivers, display modes, and devices on your system and then creates a list of supported display modes for each device.
Basically, device enumeration can be partitioned into two broad steps: (1) initiating and completing device enumeration and (2) selecting an enumerated device.
The Using Device Enumeration tutorial mirrors this process with the following sections:
For more information on Direct3D devices, see Direct3D Devices.
For more information on device enumeration, see Enumerating Direct3D Devices.
Note The code in the Enumeration application is similar to the code in the Triangle application. This tutorial focuses only on the device enumeration code unique to the Enumeration application, and does not cover setting up Direct3D, preparing scene geometry, shutting down, or processing system events. For information on these tasks, see Tutorial 1: Rendering a Single Triangle.
The Using Device Enumeration tutorial uses a depth buffer to store depth information for the scene. To use depth buffering, you must enumerate supported depth-buffer formats, create a depth-buffer surface, attach the depth-buffer surface to a render-target surface, and enable depth buffering for the rendering device. For information on these tasks, see Tutorial 2: Adding a Depth Buffer.
The Using Device Enumeration tutorial draws a series of cone primitives. For more information on how to draw primitives, see Tutorial 3: Using_Alternate Primitive Styles.