IDirect3DDevice9::DrawIndexedPrimitiveUP method (d3d9.h)
Renders the specified geometric primitive with data specified by a user memory pointer.
HRESULT DrawIndexedPrimitiveUP( [in] D3DPRIMITIVETYPE PrimitiveType, [in] UINT MinVertexIndex, [in] UINT NumVertices, [in] UINT PrimitiveCount, [in] const void *pIndexData, [in] D3DFORMAT IndexDataFormat, [in] const void *pVertexStreamZeroData, [in] UINT VertexStreamZeroStride );
Member of the D3DPRIMITIVETYPE enumerated type, describing the type of primitive to render.
Minimum vertex index. This is a zero-based index.
Number of vertices used during this call. The first vertex is located at index: MinVertexIndex.
Number of primitives to render. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the D3DCAPS9 structure (the number of indices is a function of the primitive count and the primitive type).
Type: const void*
User memory pointer to the index data.
Member of the D3DFORMAT enumerated type, describing the format of the index data. The valid settings are either:
Type: const void*
User memory pointer to the vertex data. The vertex data must be in stream 0.
The number of bytes of data for each vertex. This value may not be 0.
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be the following: D3DERR_INVALIDCALL.
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, which must be declared as stream 0.
Following any IDirect3DDevice9::DrawIndexedPrimitiveUP call, the stream 0 settings, referenced by IDirect3DDevice9::GetStreamSource, are set to NULL. Also, the index buffer setting for IDirect3DDevice9::SetIndices is set to NULL.
The vertex data passed to IDirect3DDevice9::DrawIndexedPrimitiveUP does not need to persist after the call. Direct3D completes its access to that data prior to returning from the call.
When converting a legacy application to Direct3D 9, you must add a call to either IDirect3DDevice9::SetFVF to use the fixed function pipeline, or IDirect3DDevice9::SetVertexDeclaration to use a vertex shader before you make any Draw calls.
|Header||d3d9.h (include D3D9.h)|