IDirect3DVertexBuffer::ProcessVertices
The IDirect3DVertexBuffer::ProcessVertices method processes untransformed vertices into a transformed or optimized vertex buffer.
HRESULT ProcessVertices(
DWORD dwVertexOp,
DWORD dwDestIndex,
DWORD dwCount,
LPDIRECT3DVERTEXBUFFER lpSrcBuffer,
DWORD dwSrcIndex,
LPDIRECT3DDEVICE3 lpD3DDevice,
DWORD dwFlags
);
Parameters
- dwVertexOp
-
- Flags defining how the method processes the vertices as they are transferred from the source buffer. You can specify any combination of the following flags:
- D3DVOP_CLIP
- Transform the vertices and clip any vertices that exist outside the viewing frustum. This flag cannot be used with vertex buffers that do not contain clipping information (for example, created with the D3DDP_DONOTCLIP flag).
- D3DVOP_EXTENTS
- Transform the vertices, then update the extents of the screen rectangle when the vertices are rendered. Using this flag can potentially help performance, but the extents returned by IDirect3DDevice3::GetClipStatus will not have been updated to account for the vertices when they are rendered.
- D3DVOP_LIGHT
- Light the vertices.
- D3DVOP_TRANSFORM
- Transform the vertices using the world, view, and projection matrices. This flag must always be set.
- dwDestIndex
- Index into the destination vertex buffer (this buffer) where the vertices will be placed after processing.
- dwCount
- Number of vertices in the source buffer to process.
- lpSrcBuffer
- Address of the IDirect3DVertexBuffer interface for the source vertex buffer.
- dwSrcIndex
- Index of the first vertex in the source buffer to be processed.
- lpD3DDevice
- Address of the IDirect3DDevice3 interface for the device that will be used to transform the vertices.
- dwFlags
- Reserved for future use; set to zero. Failing to set this parameter to 0 causes the method to fail and return DDERR_INVALIDPARAMS.
Return Values
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value may be one of the following values:
Remarks
You must always include the D3DVOP_TRANSFORMED flag in the dwVertexOp parameter. If you fail to include this flag, the method will fail, returning DDERR_INVALIDPARAMS.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3d.h.
Import Library: Use ddraw.lib.
See Also
Processing Vertices, Vertex Buffers