OpenGl sun

Started by
4 comments, last by GameDev.net 17 years, 1 month ago
Hi, guys! Can somebody tell me how can i make a Sun in OpenGl?
Advertisement
Too vague. We need more info. Tell us about your project, and how the Sun fits into it.
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
I have a space scene (the camera is located inside a box textured in stars...). I want to draw a sun inside this box. I can draw a textured sphere but i don't know how to "throw" light from this sphere. Or i can create the sun only with many lights? That's why i am asking for some technique of creating it. :)
glLight...
Like AP said, if you want you can use GL Lighting which for simple effects is decent and automatic,

Heres a chapter out of the opengl Red book that has some code samples and the explanation of how to use it
Just remember that because the Sun emits light turn off lighting for it, else you'll end up with a dark ball at the center of a lit solar system ;)

I seek knowledge and to help others whom seek it
or you can make the sun illuminate using opengls built-in functions, i think you can get all the light effects on the sun that way? I don't know if the illuminate methods just makes the sun plainly colored though.

This topic is closed to new replies.

Advertisement