PDA

View Full Version : Lighting, want to have glowing sphere



GhostTask
10-22-2001, 09:59 PM
Hi,
Im writing a Sim of our solar system.
So I want to have it lit up by our sun!

I tried various things (alphablending etc.)
to create a sun with a diffuse light source in it. I thought the light in opengl is only reflected by surfaces whose normals go in the opposite direction of the light.
So I created a simple solid sphere with a diffuse light source in it, but the scene is completely dark now....
Can anyone tell me how to create a glowing Sphere?

Thx in advance for help.

drummerboy_2002
10-23-2001, 06:53 PM
give the sun a GL_EMISSION value.

Ex:

glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission_value);

You can make it look like it is giving off light of some color.