For a CreateVertexBuffer call in D3D9 the FVF should normally be 0.
There is only one case where specifying an FVF is needed and that's:
- You're creating a device with software vertex processing, and
- This vertex buffer is the destination buffer for a ProcessVertices call.
If this doesn't apply (and if you don't know what ProcessVertices does or don't even know the call exists then it doesn't apply) you set FVF to 0 and the buffer will create OK and can be used for any vertex format. There are no disadvantages to setting FVF to 0 in normal usage.
For reference, ProcessVertices was an optimization with software T&L that allowed you to kick off vertex processing on another thread, or to have vertex processing occur once only for multi-pass algorithms. You run ProcessVertices and vertex processing copies from the source streams to a single destination stream, running transform and lighting on them (or the vertex shader if one is active) as it goes, and which you then use as input to a normal draw call. There's no reason to use it otherwise and ProcessVertices is not available with a hardware T&L device.
So this is a special kind of vertex buffer known as an "FVF vertex buffer" which is only used in very limited and very specific scenarios. Otherwise you just set FVF to 0 and don't worry about it.
Unfortunately a lot of D3D9 tutorial material doesn't take this distinction into account (which gives the impression that the authors of the tutorials don't really know what they're doing - also unfortunate) so you sometimes see it used. Just be aware that outside of the ProcessVertices call, 0 is a valid value for the FVF parameter and you can use it, no matter what you see in tutorials.
Edited by mhagain, 27 May 2014 - 12:33 PM.