Jump to content
  • Advertisement

Archived

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

mdias

How to access vertex position w/out locking the VertexBuffer

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

Hi, I want to make a per-polygon collision engine but I don''t know how to access the polygon''s vertices coordinates w/out locking the vertex buffer, cause if I need to lock and unlock the VertexBuffer everytime I need to test a collision I would lose a lot of performance... Does anyone knows how to do this ???? Kamikaze

Share this post


Link to post
Share on other sites
Advertisement
I know I could keep a copy of the VB coordinates but I want
to the coordinates directly from the VB, thanx anyway

Kamikaze

Share this post


Link to post
Share on other sites
Because I don''t want to waste memory...
If I had a mesh with a high polygon count I would waste
AGP memory and System memory... But I already made it
using VB->Lock(), and it doesn''t appear to make a slowdown
as I used the flag D3DLOCK_READONLY.
And I''m detecting collisions well now

And to answer your question:
If I make a copy of the VB to the Sys Memory
everytime I make a change to the mesh, like a
deformation I would have to refresh the VB in
the Sys Memory.

Kamikaze

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!