IDirect3DDevice8::SetStreamSource
This method binds a vertex buffer to a device data stream.
HRESULT SetStreamSource(
UINT StreamNumber,
IDirect3DVertexBuffer8* pStreamData,
UINT Stride
);
Parameters
- StreamNumber
[in] Specifies the data stream, in the range from 0 to the maximum number of streams - 1. - pStreamData
[in] Pointer to an IDirect3DVertexBuffer8 interface, representing the vertex buffer to bind to the specified data stream. - Stride
[in] Stride of the component, in bytes. See Remarks.
Return Values
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be D3DERR_INVALIDCALL.
Remarks
This method increments the reference count of the stream being assigned. When the stream is no longer needed, set it to NULL. If you fail to do this, the surface is not released, resulting in a memory leak.
When a flexible vertex format (FVF) vertex shader is used, the stream vertex stride in SetStreamSource must match the vertex size, computed from the FVF. When a declaration is used, the stream vertex stride in SetStreamSource should be greater than or equal to the stream size computed from the declaration.
The SetStreamSource method binds a vertex buffer to a device data stream. For details, see Setting the Stream Source.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.
See Also
Setting the Stream Source | IDirect3DVertexBuffer8 | IDirect3DDevice8::DrawIndexedPrimitive | IDirect3DDevice8::DrawIndexedPrimitiveUP | IDirect3DDevice8::DrawPrimitive | IDirect3DDevice8::DrawPrimitiveUP | IDirect3DDevice8::GetStreamSource | IDirect3DDevice8
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.