PDA

View Full Version : Lighting Effects



dam123
02-05-2009, 10:04 AM
Hey,

Im having a few issues regarding lighting. For my application I have a foreground object e.g. a cube, and a static background image.

My problem is, i would like ligthing effects on the cube but NOT on the background, at the minute if I front light the cube, the background gets really bright. I would like the cube to be illuminated but the background image unaffected.

Any ideas?

D

MaxH
02-05-2009, 10:38 AM
{define lights, materials, etc}

glEnable (GL_LIGHTING);

Draw_Cube ();

glDisable (GL_LIGHTING);

Draw_Background ();