Advertisement Jump to content


This topic is now archived and is closed to further replies.


Simple Drawing Text?

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

I need a simple way of drawing the FPS. I tried DrawDebugText(), but it crashes the program every time. Thanks a lot.

Share this post

Link to post
Share on other sites
I don''t know what DrawDebugText is, but... There are three basic ways. One is if you have some form of debug output, like a monochrome monitor, or the system debug output for a multimonitor or remote debugger, then you can draw the framerate there. But that''s not really convienient. What I would do is draw it to the game screen. There are two ways to do this, one is to flip to the GDI surface on your backbuffer, and use TextOut or DrawText to draw it. Or, you could write your own text output functions, which is what I did. It''s nice to write your own text functions, because that will help you make the game in general look better too, probably.

Good luck!

Jonathan Little

Share this post

Link to post
Share on other sites

  • 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!