Jump to content
  • Advertisement
Sign in to follow this  
Velik

OpenGL Best way to modify verticies in Dx10

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

I need modify mesh verticies every frame for my skeletal animation class. In opengl you can just modify the vertex array and pass it as is. however, in Dx10, you setup an ID3D10Buffer. Is it reasonable to use ID3D10Buffer::Map (ie. vertex buffer lock/unlock) to perform the vertex updates? Would this cause a performace issue with the vertex access being so frequent? Thanks, Velik

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Velik
I need modify mesh verticies every frame for my skeletal animation class. In opengl you can just modify the vertex array and pass it as is. however, in Dx10, you setup an ID3D10Buffer. Is it reasonable to use ID3D10Buffer::Map (ie. vertex buffer lock/unlock) to perform the vertex updates? Would this cause a performace issue with the vertex access being so frequent?

Thanks,
Velik

Why are you not using hardware skinning? Your GPU is built exactly for this sort of thing, your CPU isn't as much. This is really the only way to go if you're interested in performance-- the DX SDK has a pretty comprehensive example of the topic if you're interested in the nitty-gritty of how it works.

EDIT: On a thoroughly unrelated note, props for using 'vertices' instead of the sadly ubiquitous 'vertexes.' I'm a grammar/spelling Nazi.

Share this post


Link to post
Share on other sites
You could modify a vertex buffer directly, just make sure you set the usage to D3D10_USAGE_DYNAMIC upon creating the buffer. However, I, like InvalidPointer, would also recommend using the GPU to do this.

More info here: http://msdn.microsoft.com/en-us/library/bb172499(VS.85).aspx

Share this post


Link to post
Share on other sites
Thanks!!

This is an initial effort at skeletal animation, so its not obvious to me as to how everything fits together, including how it should be done. I will research using the gpu to do the work.

Share this post


Link to post
Share on other sites
Quote:
Original post by Velik
Thanks!!

This is an initial effort at skeletal animation, so its not obvious to me as to how everything fits together, including how it should be done. I will research using the gpu to do the work.

In general, it likely won't look any different code-wide (outside of the usual differences between shader and app-side code) than your CPU implementation anyway, which is certainly a blessing.

Share this post


Link to post
Share on other sites
A vertex array in OpenGL simply hides the transfer of data to the GPU. A more modern use of the API would be vertex buffer objects, which would be closer to what you'd do in D3D10. In terms of performance, there shouldn't be much of a difference. Especially if this is just an initial implementation, don't worry about it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!