Jump to content
  • Advertisement

Archived

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

Mille

Static Lock flags ??

This topic is 5229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!