Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've constructed a scene using OpenGL/GLUT with a spot light but I'm getting troubles with light shining some of the walls

enter image description here

what is going on and how to solve?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Without seeing any shader code and vertex setup, this is difficult to answer. But I suspect that you have winded the quads of the left wall clockwise instead of counterclockwise, or vise versa. Or you didn't specify the normals correctly.

share|improve this answer
    
Thank you! You gave me a hint to solve it and in fact I was drawing clockwise and the normal was inverted, giving me odd results. Thanks you! –  andrepcg Jun 10 '13 at 14:10
2  
GLUT doesn't support shaders. Just saying –  stas Jun 11 '13 at 3:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.