title: GLUT is working fine but OpenGL is not doing anything
body: <p>The exact same code snippet is working on another machine but its not working properly for me. The <strong>GLUT is working absolutely fine</strong> as it open the created window but the line segment is not shown on the window which means there is a <strong>problem with opengl</strong>. It is not even <strong>changing the background color</strong> of the window.</p>
  
  <p>I even test the opengl on my windows with a testing application and its working fine.</p>
  
  <pre><code>#ifdef WIN32
  #include &lt;windows.h&gt;
  #endif
  #include &lt;GL/glut.h&gt;
  #include &lt;GL/gl.h&gt;
  #include &lt;GL/glu.h&gt;
  
  void init(void){
      glClearColor(1.0, 1.0, 1.0, 0.0);
      glMatrixMode(GL_PROJECTION);
      gluOrtho2D(0.0, 400.0, 0.0, 400.0);
  }
  
  void linesegment(void){
      glClear(GL_COLOR_BUFFER_BIT);
  
      glColor3f(0.0, 0.0, 0.0);
      glBegin(GL_LINES);
      glVertex2i(180, 15);
      glVertex2i(10, 145);
      glEnd();
  
      glFlush();
  }
  int main(int argc, char* argv[])
  {
  
      glutInit(&amp;argc, argv);
      glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
      glutInitWindowPosition(50, 50);
      glutInitWindowSize(400, 400);
      glutCreateWindow("Testing Open GL");
  
      init();
      glutDisplayFunc(linesegment);
      glutMainLoop();
      return 0;
  
  }
  </code></pre>