Microsoft DirectX 8.1 (C++) |
Renders data specified by a user memory pointer as a sequence of geometric primitives of the specified type.
HRESULT DrawPrimitiveUP( D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be 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. 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 DrawPrimitiveUP call, the stream zero settings, referenced by IDirect3DDevice8::GetStreamSource, are set to NULL.
The vertex data passed to DrawPrimitiveUP does not need to persist after the call. Microsoft® Direct3D® completes its access to that data prior to returning from the call.
When converting a fixed function legacy application to Microsoft® DirectX® 8, you must add a call to IDirect3DDevice8::SetVertexShader before you make any calls to DrawPrimitiveUp. Supply SetVertexShader with the fixed function flag to tell the pipeline that the application is fixed function.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::DrawIndexedPrimitiveUP, IDirect3DDevice8::SetStreamSource, Rendering Primitives