I think you can use glut to do it. If you aren't using glut, you can probably get someone else's code that does it, or write your own code to do it using textured quads. I don't think OGL itself has anything built in for text. That's one of the few things about D3D that I like better than OGL.