PDA

View Full Version : problems with light



mithun_daa
12-01-2003, 11:44 AM
i have a DL in my display routine that draws a terrain. i dont know whatz happened all of a sudden, whenever i run the program, the scene is rendered with the light on for a couple of seconds and then goes off(light). where am i goin wrong?

mithun_daa
12-02-2003, 06:20 AM
Originally posted by mithun_daa:
i have a DL in my display routine that draws a terrain. i dont know whatz happened all of a sudden, whenever i run the program, the scene is rendered with the light on for a couple of seconds and then goes off(light). where am i goin wrong?

now my scene starts off with the lights of. only when i rotate the scene, the lights r turned on. this is been happening since i included textures in my project.
thank u.

Relic
12-02-2003, 07:48 AM
Sorry, please remember that this is the *advanced* forum. Your question doesn't really look like it qualifies to be posted here.
Sit down with the OpenGL redbook and a debugger. Go through your code and understand what you're doing before asking people to guess.

jwatte
12-02-2003, 08:21 AM
One thing that I find useful is to start out each scene render pass by slamming all the render states to known values. That provides some amount of consistency in the pipe, should I (ahem) forget to set some state.

The defaults should typically be the least useful possible; i e lime green color, black material, etc. That way, you'll notice things you forget to set very quickly.