opengl and scoring

Started by
0 comments, last by nobodynews 17 years, 6 months ago
well I am programming an opengl and c pong game, I just need to display the score to the screen, I can write text to the screen but I need to display a number to the screen
Advertisement
So, what you really want to know is how do you convert a number to text so that may be output?

Well, you're in luck. This is an incredibly common thing to do. For a list of different ways to do this, consult this link:

http://www.codeproject.com/string/string_conversions.asp

I highly encourage you do use stringstreams over all the other methods.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This topic is closed to new replies.

Advertisement