View Full Version : Me and lights dont get along
12-10-2009, 11:06 AM
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:
Just click the white page to download.
Thanks in advance.
12-10-2009, 02:51 PM
I have tried out your code. I had to zoom out and move until the objects were in view. Can you clarify what about the lights don't work?
12-10-2009, 02:52 PM
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.
12-11-2009, 02:13 AM
Thank you guys.
Moving the Init() function after glutEnterGameMode solve the problem.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.