Just a quick question. I have written a game in Open gles. How can I render a value such as an integer on the screen ? (In this case int level).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think open gl has any font support, but there are a few font libraries knocking about the internet. There is some discussion of that here:
Is there a decent OpenGL text drawing library for the iPhone SDK?
I needed to do the same thing as you, that fonts are probably overkill for. So, I simply made an array of images 0 to 9, then broke down the integer into a series of those images, by using % 10 to find which digit, then / 10 to move onto the next (more significant) digit.