How do I draw text with GLUT / OpenGL in C++?

KingNestor picture KingNestor · Feb 11, 2009 · Viewed 87.7k times · Source

How do I draw a text string onto the screen using GLUT / OpenGL drawing functions?

Answer

epatel picture epatel · Feb 11, 2009

There are two ways to draw strings with GLUT

glutStrokeString will draw text in 3D

alt text
(source: uwa.edu.au)

and glutBitmapString will draw text facing the user

alt text
(source: sourceforge.net)