Supporting Stream Offsets

A DirectX 9.0 version driver must support letting applications store vertex data of multiple vertex formats in a single vertex data stream. Applications notify the driver of where vertex data of a particular format is located in the vertex data stream by supplying the stream offset, in bytes, to the beginning of that vertex data. To support stream offset, the driver must process the D3DDP2OP_SETSTREAMSOURCE2 operation code in its D3dDrawPrimitives2 function. A D3DHAL_DP2SETSTREAMSOURCE2 structure, which follows the operation code in the command stream, is used to specify the stream and the offset to where vertex data is located.