Skip to main content
gamedev.net
🔒 Locked

Lighting Problem

Started by avianRR Oct 16, 2000 at 1:38 PM 2 replies 300+ views
Original Post
avianRR
avianRR
I''ve been working on a rather complex model in OpenGL and until now I wasn''t useing lighting. now when I add the following lines It turns all my colors into different shades of white(gray). If anyone has any ideas please let me know! GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 1.0f }; GLfloat LightPosition[]= { 0.0f, 0.0f, 0.0f, 1.0f }; glEnable(GL_LIGHTING); glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient); glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse); glLightfv(GL_LIGHT1, GL_POSITION,LightPosition); glEnable(GL_LIGHT1);
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
Dave007
Dave007
I think, that the biggest problem is
that you dont have normals defined
for you polygons in the model.

If you dont know how to do this mail me
on dave007@volny.cz.

Dave
--------Dave[ Math Studio ] A Computer Algebra System

Topic Locked

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

Sign in to reply to this topic.