Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SimonTheSorcerer

Inversed Lighting?

This topic is 5462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''m having troubles with my lighting... it seems backwards or something, hehe i got to apologize for my filthy code, there''s lot of crap in there that i played with earlier and didn''t remove... so some of the code ain''t even used. Just keep your eyes on the lighting part and i hope that you''ll be fine. my code is located here: http://www16.brinkster.com/simonsorcerer/files/thing.zip someone please take a look. Note: i havn''t followed the NeHe tutorials, so i''m not programming "NeHe-style", i''m using a book called "Computer Graphics Using OpenGL"

Share this post


Link to post
Share on other sites
Advertisement
Tjenixen simon, overlord here.

Found the problem
in void myDisplay(void) change
glTranslated(myLightPosition[0],myLightPosition[1],myLightPosition[2]);//Light Position

to

glTranslated(-myLightPosition[0],-myLightPosition[1],-myLightPosition[2]);//Light Position

It's simple, if you want to move something to the left you translate ro the right.

See ya in september.
ps. att det krävs en grafiker att lösa ditt problem, skäms.



[edited by - lc_overlord on July 28, 2003 4:49:16 PM]

Share this post


Link to post
Share on other sites
hehe, well that seems to work =)

didn''t program much this summer (too busy working), and i didn''t feel like going through that code again, ohwell thanks mate.

P.S. sabla grafikerproblem.... ;D LOL D.S.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!