title: glutBitmapCharacter() doesn't display anything?
body: <p>I am trying to make a simple text output with OpenGL, FreeGlut using <code>glutBitmapCharacter()</code>. My problem is, that i do not get any text shown. The triangle works fine. I guess the problem is not the <code>displayText()</code> function itself but maybe i call it at the wrong place or redraw/clear the text? I compile with <code>gcc main.c -lGL -lglut -o filename</code></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;GL/freeglut.h&gt;
  
  
  int WindowHeight = 500;
  int WindowWidth = 500;
  
  void displayText(float x, float y, int r, int g, int b, const char *string) {
  
      int j = strlen(string);
      glColor3f(r, g, b);
      glRasterPos2f(x, y);
      for (int i = 0; i &lt; j; i++) {
          glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, string[i]);
      }
      printf("Lange: %i - Raster: %f %f", j, x, y);
  
  }
  
  void keyboard(unsigned char key, int x, int y) {
      if (key == 27)
          exit(0);
      else
          printf("Sie haben %c gedruckt.\n", key);
  }
  
  void display(void) {
  
  
      glClearColor(1.0, 1.0, 1.0, 0);
      glClear(GL_COLOR_BUFFER_BIT);
  
      glLoadIdentity();
  
      glBegin(GL_LINE_LOOP);
      glVertex3f(-0.3, -0.3, 0);
      glVertex3f(0, 0.3, 0);
      glVertex3f(0.3, -0.3, 0);
      glEnd();
  
      displayText(200, 200, 0, 0, 255, "test");
  
      glFlush();
  }
  
  int main(int argc, char **argv) {
  
  
      glutInit(&amp;argc, argv);
      glutInitWindowSize(WindowWidth, WindowHeight);
      glutInitWindowPosition(0, 0);
      glutCreateWindow("Test");
  
      glutDisplayFunc(display);
      glutKeyboardFunc(keyboard);
  
      glutMainLoop();
      return 0;
  }
  </code></pre>