Jump to content
  • Advertisement
Sign in to follow this  
Crazyfool

ID3DXFont Problems

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

Hi, I recently updated some major parts of my code (specifically, the rendering department) and when updating the text display, some things went wrong. Basically, I am using ID3DXFont to render text (specifically the name of a monster) and before it worked just fine, but now I am rendering everything in a 2D way, which seems to have affected the text. All I changed to the code is the means in which it calculates the top/left of the text. Currently it draws the the text fine in the color I specify, but it seems to draw extra black pixels; for example, when drawing "Llama" the first L has a row of black pixels below it, and the m gets really distorted with black pixels basically surrounding it. The text that gets screwed up are getting called before the sprite->End() call, and everything after seems to be rendered just fine. Any ideas? (I will post code if need be, but its hard because things are spread out everywhere, so I am trying to give relevant details without forcing anyone to sift through code).

Share this post


Link to post
Share on other sites
Advertisement
It might be that DX is rescaling the text sprite for some reason. If you say that it worked before, try commenting out code that you changed to isolate the problem.

Share this post


Link to post
Share on other sites
Thats a good idea - though I've changed quite a bit.

One thing is it seems I sort the textures by z value, should that affect it (since it is within the sprite begin/end calls).

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!