Executing the Execute Buffer

Executing an execute buffer is a simple matter of calling the IDirect3DDevice::Execute method with pointers to the execute buffer and to the viewport describing the rendering target. You should always check the return value from this method to verify that it was successful.

The dwFlags parameter of IDirect3DDevice::Execute specifies whether the vertices you supply should be clipped. You should specify D3DEXECUTE_UNCLIPPED if you are using D3DTLVERTEX vertices and D3DEXECUTE_CLIPPED otherwise.

When you have executed an execute buffer, you can delete it. This is done simply by calling the IDirect3DExecuteBuffer::Release method. You could also use the RELEASE macro in D3dmacs.h, if you prefer.