I am having trouble getting a spotlight to work in my code. I am trying to get the spotlight to point in the positive x direction.
GLfloat dir = {1.0,0.0,0.0};
I believe that’s the desired array I want. I call glLightfv with GL_SPOT_DIRECTION and then I make the call to specify the exponent. But whenever I call SPOT_CUTOFF with any valid angle I end up getting no light at all. I want this spotlight to be the only light in the scene for now so that I can see what it looks like. I was told that due to vertex lighting any polygons whose vertices are all outside the radius of the spotlight will cause the whole poly to be black. But the spotlight is shining on polygons that should fit entirely within the spotlight. There’s something I’m not understanding. Thanks for any help.