title: Setting camera and frustum in OpenGL
body: <p>Why isn't the quad rendered? I have tried with glOrtho and glFrustrum, and the output is the same: a black screen. From what I understand, this code says that the camera is set in position (0,0,-3) and its looking at the origin. The near plane is at -2 (1 m away from the camera). What am I doing wrong?</p>
  
  <pre><code>glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  
  glMatrixMode (GL_PROJECTION);
  glLoadIdentity ();
  //glOrtho (-5,5,-5,5,-5,5);
  glFrustum(-5,5,-5,5,1,1000);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  gluLookAt(0,0,-3,0,0,0,0,1,0);
  
  glColor3f(1.0,1.0,1.0);
  glBegin(GL_QUADS);                                  
  glVertex3f(-0.5,-0.5,-0.5);
  glVertex3f(0.5,-0.5,-0.5);
  glVertex3f(0.5,0.5,-0.5);
  glVertex3f(-0.5,0.5,-0.5);
  glEnd();
  // Don't wait start processing buffered OpenGL routines
  glFlush();
  glutSwapBuffers();
  </code></pre>