Skip to main content
gamedev.net
🔒 Locked

Open GL Lighting Problem

Started by MarcusMaximus 2 replies 250+ views
Original Post
MarcusMaximus
MarcusMaximus
Hey, I''m trying to use lighting for a terrain demo im making. The trouble is, i have the terrain colored using glColor4f() and when I enable lighting, the color I set it to is completely ignored and the terrain is set to the color of the light. Is there a way to make it so the color of the light just adds to the pre-existing color of the terrain?(like in real life) Thanks for your help. -Mark
-Mark
WarAmp
WarAmp
Hmmm...I seem to recall something about

glEnable(GL_COLOR_MATERIAL) being used for this...



Waramp.

"Before you insult a man, walk a mile in his shoes.
That way, when you do insult him, you''ll be a mile away, and you''ll have his shoes."
Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.
Ostsol
Ostsol
Testing. . .

EDIT: Well, I tried banning myself and nothing happened. . .

[edited by - Ostsol on April 1, 2004 11:17:15 PM]
-Ostsol
MarcusMaximus
MarcusMaximus
Thanks! GL_Color_Material worked!!! Been trying to solve this problem for a couple months lol.

-Mark
-Mark

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.