   GL Light Vortex. :( {help w/lighting probs}
  Well other than I cant get it to work right. more to the point.I can render a sphere to the surface, but when I turn on lighting all my poly's loose themselves to a dull monotone color.looks like this  then when I turn on lighting it just turns into a grey-white mass. what might I be doing wrong?   "Life is entertainment, Why let work get in the way."[edited by - thrasmion on August 19, 2003 9:34:56 PM]
  no. they don''t "lose" their colour, they ignore it. when lighting is enabled, the material-colour (white is the default) will be used. you can override this and use _your_ colours with glEnable(GL_COLOR_MATERIAL)   ;  This would work wouldn''t it? unsigned char LightingEnabled  = glIsEnabled(GL_LIGHTING);//--if(LightingEnabled){glDisable(GL_LIGHTING);}RenderSphere();if(LightingEnabled){glEnable(GL_LIGHTING);} -UltimaX-"You wished for a white christmas... Now go shovel your wishes!" ;quote:Original post by 666_1337    no. they don't "lose" their colour, they ignore it. when lighting is enabled, the material-colour (white is the default) will be used. you can override this and use _your_ colours with glEnable(GL_COLOR_MATERIAL)    Thanks that helped, but now I have ambient but does diffuse not work on materials or just textured objects?"Life is entertainment, Why let work get in the way."   [edited by - Thrasmion on August 19, 2003 8:29:54 AM] [edited by - Thrasmion on August 19, 2003 8:30:24 AM];quote:Original post by Thrasmion   quote:Original post by 666_1337 no. they don't "lose" their colour, they ignore it. when lighting is enabled, the material-colour (white is the default) will be used. you can override this and use _your_ colours with glEnable(GL_COLOR_MATERIAL)    Thanks that helped, but now I have ambient but does diffuse not work on materials or just textured objects?"Life is entertainment, Why let work get in the way."   uh no... the colour material (as far as i know) only replaces the diffuse component. if you don't get the sphere lit, it's because you have set the texture environment to decal mode. call glTexEnvi with GL_MODULATE as third parameter.  [edited by - 666_1337 on August 19, 2003 12:11:24 PM]