Share via


D3DHAL_DP2SETSTREAMSOURCE

This structure is used to bind a vertex stream source to a vertex buffer for D3dDrawPrimitives2.

typedef struct _D3DHAL_DP2SETSTREAMSOURCE {
  DWORD dwStream; 
  DWORD dwVBHandle; 
  DWORD dwStride; 
} D3DHAL_DP2SETSTREAMSOURCE, *LPD3DHAL_DP2SETSTREAMSOURCE;

Members

  • dwStream
    Specifies stream being bound. It will have a value between zero and the maximum number of streams specified by the driver.
  • dwVBHandle
    Specifies the vertex buffer handle. It is legal for the vertex buffer handle to be zero, in which case the stream is no longer bound to a vertex buffer.
  • dwStride
    Specifies the vertex size in bytes.

Remarks

A driver is notified of the binding of a vertex buffer to a particular stream through a new DP2 token, D3DDP2OP_SETSTREAMSOURCE.

The debug run time validates that dwStream is within the legal range but the retail version does not, so validation must be present in the driver. DirectX 8.0 does not define the behavior of the driver or hardware in the error case where the stream index given is larger than the maximum stream supported by the hardware (as reported through MaxStreams in D3DCAPS8) beyond requiring that the driver and hardware combination not fault or hang in this case and that, on restoration of correct state the driver and hardware combination should continue to operate normally. Debug versions of your display driver should display messages in the debug output stream indicating when this problem has been detected.

The run time does not validate that the streams accessed by the current vertex shader are non-NULL. It is the responsibility of the driver writer to ensure the driver/hardware does not crash when this error case arises. Debug versions of your display driver should display messages in the debug output stream to indicate when this problem has been detected.

It is guaranteed that only a single stream source will be set by a D3DHAL_DP2COMMAND. That is, the wStateCount field of the D3DHAL_DP2COMMAND will always be one when bCommand is D3DDP2OP_SETSTREAMSOURCE.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3dhal.h.

See Also

D3dDrawPrimitives2 | D3DDP2OP_SETSTREAMSOURCE | D3DCAPS8 | D3DHAL_DP2COMMAND | D3DHAL_XXX Structures

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.