title: creating a 3d room in openGL c++
body: <p>I am trying to create a 3d room in openGL. I am getting the right and bottom walls right but the back wall is not being displayed. I want to create a 3d room with camera view set to certain angle and place a table and teapot in the room.</p>
  
  <p>Code:</p>
  
  <pre><code>#include&lt;GL/glut.h&gt;
  void wall(double thickness)    // function to create the walls with given thickness
  {
      glPushMatrix();
      glTranslated(0.5,0.5*thickness,0.5);
      glScaled(1.0,thickness,1.0);
      glutSolidCube(1.0);
      glPopMatrix();
  }
  
  void displaySolid(){    //function to create a 3d room
      GLfloat mat_ambient[]={0.7f,0.7f,0.7f,0.1f};
      GLfloat mat_diffuse[]={0.5f,0.5f,0.5f,1.0f};
      GLfloat mat_specular[]={1.0f,1.0f,1.0f,1.0f};
      GLfloat mat_shininess[]={50.0f};
      glMaterialfv(GL_FRONT,GL_AMBIENT,mat_ambient);
      glMaterialfv(GL_FRONT,GL_SPECULAR,mat_specular);
      glMaterialfv(GL_FRONT,GL_SHININESS,mat_shininess);
      GLfloat light_Intensity[]={0.7f,0.7f,0.7f,1.0f};
      GLfloat light_Position[]={2.0f,6.0f,3.0f,0.0f};
      glLightfv(GL_LIGHT0,GL_POSITION,light_Position);
      glLightfv(GL_LIGHT0,GL_DIFFUSE,light_Intensity);
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      double winlet=1.0;
      glOrtho(-winlet*64/48,winlet*64/48.0,-winlet*64/48,winlet*64/48,0.6,100.0);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      gluLookAt(2.3,1.38,2.0,0.0,0.25,0.0,0.0,1.0,0.0);
      glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
      glPushMatrix();
      glTranslated(0.08,0.08,0.08);
      glPushMatrix();
      glTranslated(0.6,0.38,0.5);
      glRotated(30,0,1,0);        
      glPopMatrix();
      glPushMatrix();
      glTranslated(0.25,0.42,0.35);
      glPopMatrix();
      glPushMatrix();
      glTranslated(0.4,0,0.4);    
      glPopMatrix();
      wall(0.2);
      glPushMatrix();
      glRotated(-90.0,1.0,0.0,0.0);
      wall(0.02);
      glPopMatrix();
      glFlush();
  }
  
  void main(int argc,char **argv)
  {
      glutInit(&amp;argc,argv);
      glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB|GLUT_DEPTH);
      glutInitWindowSize(640,480);
      glutInitWindowPosition(0,0);
      glutCreateWindow("the pot");
      glutDisplayFunc(displaySolid);
      glEnable(GL_LIGHTING);
      glEnable(GL_LIGHT0);
      glShadeModel(GL_SMOOTH);
      glEnable(GL_DEPTH_TEST);
      glEnable(GL_NORMALIZE);
      glClearColor(0.1,0.1,0.1,0.0);
      glViewport(0,0,640,480);
      glutMainLoop();
  }
  //end
  </code></pre>
  
  <p>This how ever is giving a black screen on the back side of the 3D cube room.I have set the lightning effect to LIGHT0, yet i am not able to see the side wall.</p>
  
  <p><img src="https://i.stack.imgur.com/Xb6mr.png" alt="This is a snapshot of the program"></p>