Direct3DDevice8.DrawIndexedPrimitiveUP
Renders the specified geometric primitive with data specified by a user memory array.
object.DrawIndexedPrimitiveUP( _
PrimitiveType As CONST_D3DPRIMITIVETYPE, _
MinIndex As Long, _
NumVertices As Long, _
PrimitiveCount As Long, _
IndexDataArray As Any, _
IndexDataFormat As CONST_D3DFORMAT, _
VertexStreamZeroDataArray As Any, _
VertexStreamZeroStride As Long)
Parts
- object
- Object expression that resolves to a Direct3DDevice8 object.
- PrimitiveType
- Member of the CONST_D3DPRIMITIVETYPE enumeration, describing the type of primitive to render.
- MinIndex
- Minimum vertex index, relative to 0 (zero) (the start of VertexStreamZeroDataArray), for vertices used during this call.
- NumVertices
- The number of vertices used during this call, starting from MinIndex.
- PrimitiveCount
- Number of primitives to render. The number of indices used is a function of the primitive count and the primitive type. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the D3DCAPS8 structure.
- IndexDataArray
- First element of the user memory array containing the index data. This parameter should point to the start of the indices to use for drawing primitives.
- IndexDataFormat
- Member of the CONST_D3DFORMAT enumeration, describing the format of the index data. The valid settings are the following:
- D3DFMT_INDEX16
- Indices are 16 bits each.
- D3DFMT_INDEX32
- Indices are 32 bits each.
- VertexStreamZeroDataArray
- First element of the user memory array containing the vertex data to use for vertex stream zero.
- VertexStreamZeroStride
- Stride between data for each vertex, in bytes, as returned by the Len Microsoft® Visual Basic® function.
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 Visual Basic Error Handling topic.
Remarks
This method is intended for use in applications that are unable to store their vertex data in vertex buffers. This method supports only a single vertex stream. The effect of this call is to use the provided vertex data pointer and stride for vertex stream zero. It is invalid to have the declaration of the current vertex shader refer to vertex streams other than stream zero.
Following any DrawIndexedPrimitiveUP call, the stream zero settings, referenced by Direct3DDevice8.GetStreamSource, are set to ByVal 0. Also, the index buffer setting for Direct3DDevice8.SetIndices is set to ByVal 0.
See Also
Direct3DDevice8.DrawPrimitiveUP, Direct3DDevice8.SetStreamSource, Rendering Primitives