Whenever I try to use glutBitmapCharacter it doesn’t show anything on the screen. What things do you need to have enabled/disabled for this function to work?
This is my rendering code that is run inside my main loop:
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glMatrixMode (GL_PROJECTION);
glPushMatrix ();
glLoadIdentity ();
gluOrtho2D (0, windowinfo->width, windowinfo->width, 0);
glRasterPos2i(0,0);
glutBitmapCharacter (GLUT_BITMAP_9_BY_15, 'H');
glPopMatrix ();
This is my GL initialization code:
glShadeModel (GL_SMOOTH);
glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
glClearDepth (0.1f);
glEnable (GL_DEPTH_TEST);
glEnable (GL_TEXTURE_2D);
glDepthFunc (GL_LEQUAL);
glHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);