Jump to content
  • Advertisement


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



This topic is 6193 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

Can someone please post the correct code procedure to append indices to an index buffer, such that i dont need to call D3DLOCK_DISCARD each frame on my dynamic index buffer? Im confused about where I specify the starting index, etc.

Share this post

Link to post
Share on other sites
I''m not sure that any IHVs are doing buffer renaming on IBs yet so at the moment its likely to be a non-issue.

I''d suspect that when/if they do start doing renaming (dynamic IBs isn''t such a common case), the same rules as with dynamic vertex buffers will apply (possibly moreso due to the much smaller size of IBs). The correct VB scheme is in the DX FAQ:


Simply don''t lock with DISCARD until you''ve reached the end of the buffer and do lock with NOOVERWRITE at other times remembering not to access any previously written parts of the buffer.

Due to the small nature of IBs, batching may not be necessary anyway to get the most out of hardware IBs (though most cards don''t support hardware IBs) - depending on the size calling with discard every time might be the right thing to do!

Simon O''''Connor
Creative Asylum Ltd

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!