title: Draw a triangle with OpenGL
body: <p>Write a C++ program which will draw a triangle having vertices at (300,210),
  (340,215) and (320,250). Center of the triangle lies at (320,240).</p>
  
  <pre><code>#include &lt;GL/glut.h&gt;
  #include &lt;stdlib.h&gt;
  
  void display(void)
  {
      glClearColor(1,1,0,0);
  
      glClear(GL_COLOR_BUFFER_BIT);
  
      glBegin(GL_TRIANGLES);
  
      glColor3f(0.5,0,0);
  
      glVertex2f(300.0,210.0);
      glVertex2f(340.0,215.0);
      glVertex2f(320.0,250.0);
  
      glEnd();
  
      glFlush();
  }
  
  int main(int argc, char *argv[])
  {
      glutInit(&amp;argc, argv);
      glutInitWindowSize(640,500);
      glutInitWindowPosition(1,1);
  
      glutCreateWindow("Triangle");
  
      glutDisplayFunc(display);
  
  
      glutMainLoop();
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>Issue triangle isn't appearing only a yellow screen appears.</p>