• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Need help from an OpenGL expert !

Started by Chris Boss, June 23, 2010, 02:54:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Charles Pegge

#15
Light is wholly dependent on normals. When Lighting is active the illumination of a surface is proportional to the cosine of the angle between the normal and the direction of the light source (roughly speaking). I you ceate you own objects then specifiying the GLNormal per vertex is essential. Manipulating the normals also allows you to fake smooth surfaces.

I have not used GLU shapes but I am sure they all come with their own set of normals.

For solar system lighting the light source should be placed in the same position as the Sun - and be under the same geometric transforms. Then when the sun moves so will the light. The planets to receive this illumination should come after the solar light source is defined and activated.

I hope this gives you a few clues.

Charles