Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lighting problems...


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 jalaine   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 08:40 AM

Hi! I''m having this problem with lighting in my opengl 3D engine.. With textures it works fine, but the objects that only have a color (set with glColor3f()) and no texture show shaded but not with the color I set to them but the color I set as the light''s ambient value. So most of the time they just look solid white. I set correct normals to the objects so that shouldn''t be the problem. Can you help me or at least point me to the right direction? Thanks a lot! Jarkko

Sponsor:

#2 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 25 August 2001 - 12:05 PM

u need to use materials with lighting enabled check here
http://www.frii.com/~martz/oglfaq/

#3 jalaine   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 August 2001 - 11:53 PM

Thanks for your help, I added the material code:

glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse);
glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);

to the rendering function and now everything works fine!

Thanks!

Jarkko





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS