PDA

View Full Version : Turn off the lights



kotoko
06-14-2009, 12:38 PM
Hello!

I'm trying to turn off the lights but I can't.

I'm using just glEnable(GL_LIGHTING); and then adding no lights.

Where am I going wrong?

vivek vyas
06-14-2009, 12:41 PM
please give some code
but may be
and perhapes you not enabled GL_LIGHT0 (it might be source id 0 of light)
and
i think it follows Global Light Problem Right?

(
please not much cause i am newbie
)

vivek vyas
06-14-2009, 12:50 PM
is it
http://www.falloutsoftware.com/tutorials/gl/gl8.htm
and it will same as i posted in Global Light Problem
some where you find
ambiancy diffuse shininess used properly in code some times by wrong position color not give desireable result
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLighfv(..
....
...
glMaterial....
thats final from me(pleease send me game)

kotoko
06-14-2009, 02:02 PM
Thanks for the reply.

The problem was not that it was dark but that it was light and I had no lights enabled.

It turns out that the core problem was that I was drawing the textures with
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

instead of

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

vivek vyas
06-14-2009, 09:38 PM
The problem was not that it was dark but that it was light and I had no lights enabled.

is your problem solved
if please send me the game(i love games)