Microsoft DirectX 9.0 SDK Update (October 2004)

Device.GetStreamSource Method

Language:

Note: This documentation is preliminary and is subject to change.

Retrieves a vertex buffer bound to the specified data stream.

Definition

Visual Basic .NET Public Function GetStreamSource( _
    ByVal streamNumber As Integer, _
    ByRef offsetInBytes As Integer, _
    ByRef stride As Integer _
) As VertexBuffer
C# public VertexBuffer GetStreamSource(
    int streamNumber,
    out int offsetInBytes,
    out int stride
);
Managed C++ public: VertexBuffer* GetStreamSource(
    int streamNumber,
    int *offsetInBytes,
    int *stride
);
JScript .NET public function GetStreamSource(
    streamNumber : int,
    offsetInBytes : int,
    stride : int
) : VertexBuffer;

Parameters

streamNumber System.Int32. Number of the data stream, in the range of 0 to the maximum number of streams -1.
offsetInBytes System.Int32. Offset from the beginning of the stream to the beginning of the vertex data, in bytes. See Remarks.
stride System.Int32. Pointer to a returned stride of the component, in bytes. See Remarks.

Return Value

Microsoft.DirectX.Direct3D.VertexBuffer . A VertexBuffer class that represents the returned vertex buffer bound to the specified data stream.

Remarks

A stream is a uniform array of component data in which each component consists of one or more elements that represent a single entity such as position, normal, or color.

When a flexible vertex format (FVF) vertex shader is used, the stride of the vertex stream must match the vertex size, computed from the FVF. When a declaration is used, the stride should be greater than or equal to the stream size computed from the declaration.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center