translating transformed vertices in buffers

Started by
3 comments, last by Muhammad Haggag 19 years, 3 months ago
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
Advertisement
Have you tried: D3DXMatrixTransformation2D
------------------------See my games programming site at: www.toymaker.info
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)

Transformation2D doesn't seem to be working.

How do I use a dynamic vertex buffer? Can I lock it, change the values, and then unlock it?
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.

This topic is closed to new replies.

Advertisement