Ways to draw text in OpenGL:
In all these methods, a basic idea is to create an array of objects - one for each possible text character - and to index the array using string characters during drawing.
This makes use of the facts that, in C & C++:
Pseudocode:
fontDrawingData characters[MAX_CHARACTERS];
drawString(char * string, int stringLength)
{
for (int i=0; i < stringLength; i++)
{
int charIndex = string[i];
drawTextObject(characters[charIndex]);
advanceDrawingPosition(characters[charIndex]);
}