title: how to use glDrawPixels to render a picture as a background
body: <p>Here is the thing: I want to load a picture as a background filled in the whole viewport. This background should always face to the camera no matter where the camera face to. 
  First I naturally think use a texture as a background, my code is below:</p>
  
  <pre><code>glMatrixMode(GL_PROJECTION);
  glPushMatrix();
  glLoadIdentity();
  glOrtho(0,1,0,1,0,1);
  glMatrixMode(GL_MODELVIEW);
  glPushMatrix();
  glLoadIdentity();
  
  glBindTexture(GL_TEXTURE_2D, myimage.GetID());
  glEnable(GL_TEXTURE_2D);
  
  glBegin(GL_QUADS);
  glTexCoord2f(0, 0); glVertex2f(0, 0);
  glTexCoord2f(1, 0); glVertex2f(1, 0);
  glTexCoord2f(1, 1); glVertex2f(1, 1);
  glTexCoord2f(0, 1); glVertex2f(0, 1);
  glEnd();
  
  glMatrixMode(GL_PROJECTION);
  glPopMatrix();
  glMatrixMode(GL_MODELVIEW);
  glPopMatrix();
  glDisable(GL_TEXTURE_2D);
  glBindTexture(GL_TEXTURE_2D, 0);
  </code></pre>
  
  <p>Believe me, myimage is a CIMAGE class that can load pics into textures, it works well.
  However, for some unknown reason, my application cannot load a texture into a rectangle. (I described this problem here <a href="https://stackoverflow.com/questions/10698522/why-cannot-load-texture-into-my-app">click</a>) As a result, I only can see a rectangle frame around my viewport. </p>
  
  <p>So, I figure out another solution.</p>
  
  <p>I use the glDrawPixels instead of a texture. My code is below:</p>
  
  <pre><code>glRasterPos2i(0, 0);
  glDrawPixels(myimage.GetWidth(), myimage.GetHeight(), (myimage.GetBPP() == 24)?GL_RGB:GL_RGBA, GL_UNSIGNED_BYTE, 
      myimage.GetData());
  </code></pre>
  
  <p>The picture appeared! However, the pic didn't always face to my camera. It only appears in a particular direction. You know, like a object in the scene, but not a background always face to the camera. </p>
  
  <p>So anybody know how to use the glDrawPixels to implement a background?</p>
  
  <p>By the way, I think this background is not a object placed in the 3D scene. So billboards may not be my solution. Again, this background filled in the whole view port and always face to camera.</p>