Jump to content
  • Advertisement
Sign in to follow this  
nickwinters

translating transformed vertices in buffers

This topic is 4876 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'm using transformed vertices for the gui. My problem is how to translate them. The translations that worked for 3d objects don't seen to work. Currently, every time I'm creating a new vertex buffer on every render, and that's causing a bit of jumpiness. Is there a simple way to translate them? Thanks. -Nick

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by nickwinters
Currently, every time I'm creating a new vertex buffer on every render, and that's causing a bit of jumpiness.

You should never create resources every frame - if your data changes every frame, simply use a dynamic vertex buffer (or ID3DXSprite, which uses one internally)

Share this post


Link to post
Share on other sites
Quote:
Original post by nickwinters
How do I use a dynamic vertex buffer? Can I lock it, change the values, and then unlock it?

Yes, it's optimized for this scenario. You can find a lot of info in the docs, as well as through google.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!