次の方法で共有


IDirect3DDevice8::DrawPrimitiveUP

This method 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
);

Parameters

  • PrimitiveType
    [in] Member of the D3DPRIMITIVETYPE enumerated type, describing the type of primitive to render.
  • PrimitiveCount
    [in] Number of primitives to render. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the D3DCAPS8 structure.
  • pVertexStreamZeroData
    [in] User memory pointer to vertex data to use for vertex stream zero.
  • VertexStreamZeroStride
    [in] Stride between data for each vertex, in bytes.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

The vertex data passed to DrawPrimitiveUP does not need to persist after the call. Direct3D completes its access to that data prior to returning from the call.

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.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

Rendering Primitives | D3DPRIMITIVETYPE | IDirect3DDevice8::DrawIndexedPrimitiveUP | IDirect3DDevice8::GetStreamSource | IDirect3DDevice8::SetStreamSource | D3DCAPS8 | IDirect3DDevice8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.