Unlocking the Execute Buffer

When you have finished filling the execute buffer, you must unlock it. This alerts the driver that it can work with the buffer. You can unlock the buffer by calling the IDirect3DExecuteBuffer::Unlock method.

When the execute buffer has been unlocked, call the IDirect3DExecuteBuffer::SetExecuteData method to give the driver some important details about the buffer. This method takes a pointer to a D3DEXECUTEDATA structure. Among the information you provide in this structure are the offsets of the vertices and instructions, which you have been tracking ever since locking the buffer, as described in Locking the Execute Buffer.