Advertisement Jump to content
Sign in to follow this  

Reading drawn text

This topic is 2422 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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!