Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How would I go about creating a menu system with fonts in OpenGL? I want to make a dungeon crawler and will need a menu for inventory and stats for the weapons. I can draw a world made out of blocks ok but I'm not quite sure how to do this.

I think I need to use the matrix that glortho applies to the matrix stack. Specifically I'm using WebGL and I don't have access to fonts so it seems like I have to create my own.

Any help with how I would go about doing this would be appreciated.

share|improve this question
Do any of the answers in this question help:… – Tetrad May 1 '11 at 19:35
I don't think so. – Xavier May 1 '11 at 20:53
up vote 2 down vote accepted

OpenGL know nothing of fonts, so you have two choices. Either use bitmap fonts (a font written into a texture) or use Canvas/HTML to display your text.

Most regular OpenGL games uses bitmap fonts.

share|improve this answer

If you're using WebGL, using the properties of the underlying 'canvas' element from which you created the context from to draw text. Don't make it harder than it needs to be until it needs to be.

share|improve this answer

Maybe I just don't understand your question, but if you want to draw text, you can use function glutBitmapCharacter.

share|improve this answer
Assuming he is even using GLUT – dcousens May 2 '11 at 15:15
GLUT isn't available for WebGL. – Xavier May 2 '11 at 22:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.