Processing Vertex Data |
The Device class 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 constants of the CreateFlags enumeration control vertex processing behavior for the hardware and reference devices.
The BehaviorFlags structure can also be used to control behavior using properties that access these same constant values.
Specify one of these flags when calling the Device constructor. The MixedVertexProcessing mixed-mode flag enables the device to perform both software and hardware vertex processing. Only one of these three vertex processing flags may be set for a device at any one time; they are mutually exclusive. Note that the HardwareVertexProcessing flag is required to be set when creating a pure device (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 properties of the VertexProcessingCaps structure to determine the hardware vertex processing capabilities of the device. For software vertex processing the following VertexProcessingCaps capabilities are supported (which are all but two of the available capabilities).
In addition, the following table lists the values that are set for device capabilities (Caps) for the software vertex processing mode.
Member | Software vertex processing capabilities |
---|---|
MaxActiveLights | Unlimited |
MaxUserClipPlanes | 6 |
MaxVertexBlendMatrices | 4 |
MaxStreams | 16 |
MaxVertexIndex | int(0xffffffff) |
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 hardware 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, typically with the SystemMemory constant of the Pool enumeration.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center