|Microsoft DirectX 9.0|
The IDirect3DDevice9 interface supports vertex processing in both software and hardware. In general, the device capabilities for software and hardware vertex processing are not identical. Hardware capabilities are variable, depending on the display adapter and driver, while software capabilities are fixed.
The following flags control vertex processing behavior for the hardware abstraction layer (HAL) and reference devices.
Specify one of the vertex processing behavior flags when calling IDirect3D9::CreateDevice. The mixed-mode flag enables the device to perform both software and hardware vertex processing. Only one vertex processing flag may be set for a device at any one time. Note that the D3DCREATE_HARDWARE_VERTEXPROCESSING flag is required to be set when creating a pure device (D3DCREATE_PUREDEVICE).
To avoid dual vertex processing capabilities on a single device, only the hardware vertex processing capabilities can be queried at run time. Software vertex processing capabilities are fixed and cannot be queried at run time.
You can consult the VertexProcessingCaps member of the D3DCAPS9 structure to determine the hardware vertex processing capabilities of the device. For software vertex processing the following capabilities are supported.
In addition, the following table lists the values that are set for members of the D3DCAPS9 structure for a device in software vertex processing mode.
|Member||Software vertex processing capabilities|
Software vertex processing provides a guaranteed set of vertex processing capabilities, including an unbounded number of lights and full support for programmable vertex shaders. You can toggle between software and hardware vertex processing at any time when using the HAL Device, the only device type that supports both hardware and software vertex processing. The only requirement is that vertex buffers used for software vertex processing must be allocated in system memory.