I have created an OpenGL program with 50 rotating cubes and a camera so you can move around the scene.I want to lights but they won’t work. Please tell me what im doing wrong. The source code code can be found at:
You need to move the init() function call AFTER the call to glutEnterGameMode.
This is because glutEnterGameMode creates it’s own window, and this window has it’s own state associated with it. So, your previous glEnable statements did not affect this window.