title: GLUT_SINGLE displays a black screen
body: <p>It took me >1 day and I still haven't figured out why. 
  I'm using Ubuntu 9.10, trying to make a simple OpenGL to work in c++. </p>
  
  <p>whenever I used GLUT_SINGLE parameter, it gives me a full black screen. I had to click mouse randomly on that screen in order to get out. This is so much annoying. Possibly a bug. Can anybody help?</p>
  
  <p>Here is the code that I use, drawing a simple triangle in c++:</p>
  
  <pre><code>#include &lt;GL/glut.h&gt;
  #include &lt;GL/gl.h&gt;
  #include &lt;GL/glu.h&gt;
  
  void myDisplay()
  {
      glClear(GL_COLOR_BUFFER_BIT);
      glBegin(GL_TRIANGLES);
          glVertex3f(-0.5,-0.5,0.0);
          glVertex3f(0.5,0.0,0.0);
          glVertex3f(0.0,0.5,0.0);
      glEnd();
      glFlush();
  
      glutSwapBuffers();
  }
  
  void myReshape(int a, int b)
  {
  }
  
  void myMouse(int a, int b, int c, int d)
  {
  }
  
  void myKeyboard(unsigned char c, int a, int b)
  {
  }
  
  void myInit()
  {
  }
  
  int main(int argc, char ** argv)
  {
      glutInit(&amp;argc,argv); // initiaize the toolkit
      glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); // set the display mode 
      glutInitWindowSize(640,480); // set window size
      glutInitWindowPosition(0,0); 
      glutCreateWindow("first window");
  
      glutDisplayFunc(myDisplay);
  
  
      glutReshapeFunc(myReshape);
      //glutMouseFunc(myMouse);
      //glutKeyboardFunc(myKeyboard);
  
      myInit();
      glutMainLoop();
  
      return 0;
  }
  </code></pre>