title: OpenGL + GLUT Spot light
body: <p>I'm having a bit of trouble creating a nice spot light. So far, my lighting properties are like this :</p>
  
  <pre><code>    /* Spot light */
  glEnable(GL_LIGHT1);
  GLfloat ambientColor[] = {0.0f, 0.0f, 0.0f, 1.0f};
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientColor);
  
  //Light
  GLfloat lightColor0[] = {0.7f, 0.7f, 0.7f,0.0f};
  GLfloat lightPos0[] = {0.0f, 3.0f, 0.8f, 0.0};
  glLightfv(GL_LIGHT1, GL_SPECULAR, lightColor0);
  glLightfv(GL_LIGHT1, GL_DIFFUSE, lightColor0);
  glLightfv(GL_LIGHT1, GL_POSITION, lightPos0);
  
  glLightf(GL_LIGHT1, GL_SPOT_CUTOFF, 15.0);
  GLfloat spot_direction[] = { 0.0, -1.0, 0.0 };
  glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, spot_direction);
  glLightf(GL_LIGHT1, GL_CONSTANT_ATTENUATION, 1.0);
  glLightf(GL_LIGHT1, GL_SPOT_EXPONENT, 2.0);
  </code></pre>
  
  <p>I'm getting a 'spot light' of sorts... at least, its a light that sits above my scene and shines down on the objects, but its not (as far as I can tell) appearing in a conical sort of way. <br/>
  <strong>This is the scene I'm trying to create</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/TFDVS.png" alt="Target Scene"> </p>
  
  <p><strong>And here's what I've got so far</strong>. <img src="https://i.stack.imgur.com/L76D1.png" alt="Result so far"> 
  <br/>I know my textures are a little buggered too, if any one could help with that as well, that'd be great!</p>