Jump to content
  • Advertisement
Sign in to follow this  
Mato

Reading drawn text

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

So i am trying to read the text that is being drawn at the screen for a DirectX 9 game. The game uses a font sprite that contains all the letters for the font, i can already easily detect from the sprite size when a letter is being drawn, but the problem is that i cannot seem to find any way to get what part of the sprite is being drawn so i could indentify the character. The game uses a quad to draw the letter but the UV coordinates for the top-left point are just 0,0 so they dont help much.

I would appreciate it if someone could tell me how drawing only a part of a sprite is done without using UV coords for the vertices.

EDIT: Solved, i had just forgot to add the StartVertex * stride to the pointer to get the real first vertex. Edited by Mato

Share this post


Link to post
Share on other sites
Advertisement
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!