Inversed Lighting?

Started by
1 comment, last by SimonTheSorcerer 20 years, 8 months ago
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"
Debugging in progress...
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]
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.
Debugging in progress...

This topic is closed to new replies.

Advertisement