Device.GetStreamSource(Int32,Int32,Int32) Method (Microsoft.DirectX.Direct3D)

Retrieves a vertex buffer bound to the specified data stream.

Definition

Visual Basic 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
);
C++ public:
VertexBufferGetStreamSource(
    int streamNumber,
    [Out] intoffsetInBytes,
    [Out] intstride
);
JScript 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