Archived

This topic is now archived and is closed to further replies.

Mille

Static Lock flags ??

Recommended Posts

Hej all I''ve created a huge vertexBuffer (juubi) to be filled with static vertices. The question is which flag to use in the Lock(..) call: The flags available are: D3DLOCK_DISCARD D3DLOCK_NO_DIRTY_UPDATE D3DLOCK_NO_SYSLOCK D3DLOCK_READONLY D3DLOCK_NOOVERWRITE I know D3DLOCK_DISCARD should be used with dynamic vertices, but I can find any comment in th DX-SDK documentation on what flag to use with static vertices. Any help ? I assume the lock flag is the same for the indexBuffer ?

Share this post


Link to post
Share on other sites
0 is valid flag too; and perfectly useful for initial loading and general manipulation of data, especially in system memory buffers.

-Nik

EDIT: However, while 0 is convenient, it's not usually the most optimal way to access the buffer, in terms of hardware performance. Read ATI or NVidia papers on asynchronous rendering for an explanation as to why.


[edited by - Nik02 on March 22, 2004 4:55:25 AM]

Share this post


Link to post
Share on other sites