C++ – How to draw text with GLUT / OpenGL in C++


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

Best Solution

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)