Original Post
From what I gathered..
Using vertex buffers (DrawPrimitiveVB) over our own buffer (DrawPrimitive) may be faster as the video driver may put
the data in a DMA area (rather than our own buffer which is always system memory).. So even if video card runs out of memory,
it will only be as slow as using our own buffer.. so use it often
However the speed increase comes in place when it saves on re transforming the vertices (for non TnLHAL cards - basically all except GeForce and a few minority)
In the following situation
"Normal" method
----------------
1. Allocate and fill own object buffer (one time setup)
2. Change the render state
3. Call DrawPrimitive (send it for transforming)
4. Change render state
5. Call DrawPrimitive (redundant transformation)
Vs
Vertex Buffer (If non TnLHAL)
------------------------------
1. Create System-only VB (source) and fill it (one time setup)
2. Create VB (Write only, dest) (one time setup)
3. Call dest->ProcessVertices (Do 1 transformation only)
4. Change render state
5. Call DrawPrimitiveVB (use dest)
6. Change render state
7. Call DrawPrimitiveVB( use dest. Not re - transformed)
And
Vertex Buffer (If TnLHAL)
--------------------------
1. Create VB and fill it (one time setup)
2. Change render state
3. Call DrawPrimitiveVB ( use hw to do the transformation)
4. Change render state
5. Call DrawPrimitiveVB ( let the card do the redundant transformation)
The above assume using the D3D TnL..
The VB can be furthur optimised with the Optimise function if the vertex data does not change. Even if it does change often, the Lock/Unlock does not take much time, so it''s always better to use VB over our own buffer..
Sorry for the long post..Am I on the right track? Is there any other usage for VB??
..