Jump to content
  • Advertisement
Sign in to follow this  
nickwinters

translating transformed vertices in buffers

This topic is 4962 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.

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!