title: Want an OpenGL 2D example (VC++, draw a rectangle)
body: <p>I want to create a high performace 2D program.</p>
  
  <p>I'm using VC++2008. Suppose I have created the main window. What I want is to draw a red rectangle (top left: 10,20, bottom right: 200, 300) in the main window's client area like what FillRect() API does but using OpenGL.</p>
  
  <pre><code>void InitOpenGL(HWND hwnd)
  {
  .... // What should I do?
       // Only for 2D drawing, and the (0,0) should be the top left point.
  }
  
  // the function below will be called in the WM_PAINT handler
  void DrawRectWithOpenGL(RECT* pRect)
  {
  .... // What should I do?
  }
  </code></pre>
  
  <p>EDIT1: Does OpenGL have a 2D drawing API or lib like Direct2D/DirectWrite?</p>