added braces between glPushAttrib and glPopAttrib
added comments, added code for handling when the camera to too close to the scene