[pascal]type
TMyVertices = packed record
pos, norm: TD3DVector;
end;
TVerticesArray = array of TMyVertices;

const
MyFVF = (D3DFVF_XYZ or D3DFVF_NORMAL);

function VertexBufferGenerator(Device: IDirect3DDevice9; const vertices: TVerticesArray): IDirect3DVertexBuffer9;
var
i: Integer;
Data: Pointer;
begin
i:= High(vertices)*SizeOf(TMyVertices);
Device.CreateVertexBuffer(i, D3DUSAGE_WRITEONLY, MyFVF, D3DPOOL_MANAGED, Result, nil);
Result.Lock(0, 0, Data, D3DLOCK_NOSYSLOCK);
try
Move(vertices[0], Data^, i);
finally
Result.Unlock;
end;
end;[/pascal]