Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.GetStreamSource

Retrieves a vertex buffer bound to the specified data stream.

object.GetStreamSource( _ 
    StreamNumber As Long, _ 
    RetStreamData As Direct3DVertexBuffer8, _ 
    RetStride As Long)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
StreamNumber
Specifies the data stream, in the range from 0 to the maximum number of streams - 1.
RetStreamData
A Direct3DVertexBuffer8 object, representing the returned vertex buffer bound to the specified data stream.
RetStride
Returned stride of the component, in bytes. See Remarks.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

A stream is defined as a uniform array of component data, where each component consists of one or more elements representing a single entity such as position, normal, color, and so on.

The following code fragment shows how to call GetStreamSource.

Dim device As Direct3DDevice8
Dim retVB As Direct3DVertexBuffer8
Dim retStride As Long

device.GetStreamSource 0, retVB, retStride

When GetStreamSource returns, retVB and retStride have been set to valid values.

See Also

Direct3DDevice8.SetStreamSource