PDA

View Full Version : Use glColor and Lighting together



Rapthor
01-13-2007, 06:46 AM
Hi,

how is it possible to set a glColor3f() that is shown even when Lighting is enabled via glEnable(Gl.GL_LIGHTING)?

I am currently using lighting with a white light source but I want to be able to see colors as well.

Komat
01-13-2007, 07:00 AM
You need to enable tracking of current color by material used for lighting. See documentation of glEnable( GL_COLOR_MATERIAL ) and glColorMaterial functions.

Rapthor
01-14-2007, 03:43 AM
Ok, thanks. I will give it a try.