Im confused about vertex buffers in Direct3D. What do the various parameters mean when allocating and locking vertex buffers?
• If the buffer is created as STATIC (D3DUSAGE_DYNAMIC not specified), it goes into video memory, period. These vertex buffers are meant to be written once and not read back. • The D3DUSAGE_WRITEONLY flag has a meaning only when the D3DUSAGE_DYNAMIC flag is set. • If the buffer is created as DYNAMIC (D3DUSAGE_DYNAMIC specified) and D3DUSAGE_WRITEONLY is specified, it goes into video memory. • If the buffer is created as DYNAMIC (D3DUSAGE_DYNAMIC specified) and D3DUSAGE_WRITEONLY is not specified, it goes into AGP memory. (CPU reads faster from AGP than video memory, but not as fast as from system memory, good compromise) • If there is no more video memory the buffer goes into AGP memory; if there is no more AGP memory, creation fails unless the buffer’s allocation pool is POOL_ MANAGED in which case the RUNTIME will actually free as many other buffers as necessary until the creation does not fail anymore and keep a copy of the vertex buffer in system memory; the freed buffers will get