Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Im confused about vertex buffers in Direct3D. What do the various parameters mean when allocating and locking vertex buffers?

0
Posted

Im confused about vertex buffers in Direct3D. What do the various parameters mean when allocating and locking vertex buffers?

0

• 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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123