title: C++ OpenGL drawing a room
body: <p>I'm trying to draw a square room in openGL, and I have this:</p>
  
  <pre><code>void drawWalls()
  {
  
  glColor3f(1,0,0);
  glPushMatrix();
  //glRotatef(0,0,0,1);
  //glScalef(2,1,2);
  glBegin(GL_QUADS);
  /* Floor */
  glVertex3f(-1,-1,-1);
  glVertex3f(1,-1,-1);
  glVertex3f(1,-1,1);
  glVertex3f(-1,-1,1);
  /* Ceiling */
  glVertex3f(-1,1,-1);
  glVertex3f(1,1,-1);
  glVertex3f(1,1,1);
  glVertex3f(-1,1,1);
      /* Walls */
  glVertex3f(-1,-1,1);
  glVertex3f(1,-1,1);
  glVertex3f(1,1,1);
  glVertex3f(-1,1,1);
  
  glVertex3f(-1,-1,-1);
  glVertex3f(1,-1,-1);
  glVertex3f(1,1,-1);
  glVertex3f(-1,1,-1);
  
  glVertex3f(1,1,1);
  glVertex3f(1,-1,1);
  glVertex3f(1,-1,-1);
  glVertex3f(1,1,-1);
  
  glVertex3f(-1,1,1);
  glVertex3f(-1,-1,1);
  glVertex3f(-1,-1,-1);
  glVertex3f(-1,1,-1);
  glEnd();
  
  glPopMatrix();
  
  }
  </code></pre>
  
  <p>For whatever reasons, it's not drawing all of my sides! I've looked through my vector and it appears to be correct... But when you look inside, you see this:</p>
  
  <p><img src="https://i.stack.imgur.com/neEfc.png" alt="walls"></p>
  
  <p>What am I doing wrong? Or if possible, is there a better way to draw a room rather than this? Thanks</p>