View Full Version : Me and lights dont get along
12-10-2009, 10: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, 01: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, 01: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, 01:13 AM
Thank you guys.
Moving the Init() function after glutEnterGameMode solve the problem.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.