Jump to content
  • Advertisement

Archived

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

TBird66

need answer

This topic is 5221 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

so thats my problem... directional looks like a positional w is 0.0 not 1.0 --part of src code GLfloat dir[] = {0.0, 1.0, 0.0, 0.0}; glLightfv(GL_LIGHT0, GL_POSITION, dir); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); //do the rendering --end of code so, where is the problem??

Share this post


Link to post
Share on other sites
Advertisement
I''m only in need of a correct directional lighting for a diffuse lighting,

or shall I try to use my own lighting, but if its also fast??

Share this post


Link to post
Share on other sites
ok, well the next one who comes to this topic,
please post anything, otherwise I think I''m lost in this world...
thx

Share this post


Link to post
Share on other sites
yehaa, thanks for your attention, now I´m really happy, thousand thanks to you...

...well, i expect a light coming from one direction with no radius, no attenuation, and no cut off, and no position (because of this unfinite distance), but all i get is a light which seems to be a spot light, but i need this directional light for a big landscape and i need something like a sun...

...please help, thanks for your efforts.

Share this post


Link to post
Share on other sites
1. Checked glError?

2. Are you sure your normals are correct?

3. The default light position is an directional light, does it look correct (as in, not a point light) if you don''t specify the light position?

Share this post


Link to post
Share on other sites
1. check glerror -> no error

2. normals -> normal also normalized with glNormalize enabled

3. if i don´t specify any position (leaving everything default) i also got a spot light looking light...

thanks for your time helping me

Share this post


Link to post
Share on other sites

hi....

did ur problem get solved?? If yes, then could u plz post how, and what was the problem. If not, then best of luck with it

SuperDuck
=========
We are all like a duck ... it looks calm and cool above the water; but underneath, its tiny feet are peddling hard to stay afloat. Me? I''''m just another duck in the pond!!!

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!