Sign in to follow this  
rene_g

Bitmap font: To use pre-transformed vertices or not to?

Recommended Posts

Hello all! I'm still figting with my own bitmap font renderer. *sigh* I have problems with my text being smudgy and not consistently rendered. I'm not using pre-transformed vertices, as I thought (Maybe incorrectly?) that it would limit my possibilities. But after trying to make this thing work, I'm beginning to have doubts about my choice of not using pre-transformed vertices. So really, my question is, do you guys use pre-transformed vertices for your font renderer? It just seems to me it would create some other problems. Like, how can I move pre-transformed vertices? As far as I know, I can't. So I would have to update the vertex buffer when I want to move text. Isn't that an expensive operation? I'm bit confused right now, I have my font parser up and running, I just can't get Direct3D to render it properly. Any advice in this regard is highly appreciated! Best regards René

Share this post


Link to post
Share on other sites
The only way to move the pre-transformed vertices is to update the vertex buffer. If you want to avoid performance problems, you can try swapping between two buffers or only updating portions of the buffer that you're not rendering that frame. That should keep you from stalling the GPU. Either way, make sure you profile in PIX to make sure there's no stalls (they'll show up as bright red on the GPU graph).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this