Got lighting to work. This, as it turns out, is a very high level feature in OpenGL, the books tout it as what separates OpenGL from other 3d modeling systems. I'm sure my program stays mainly in the basics.
The problem I had to solve was lighting the solar system from the center, while having the sun lit as well. I tries setting the light source up in the middle and giving the sun a light emission attribute, but this looked like crap, the emission lighting isn't for pure lighting, it's to add highlights. After moving the light around and failing repeatedly, I found out about the attribute stack. It's like the view matrix stack, except it's for attributes.
I set a high amount of ambient light, hit a specular highlight so the center of the sun is lit up, gave it some red emission and then popped the attribute stack....
Next, I turned off that light, turned on the light inside the sun and drew the planets.
After that, I popped the attribute stack and the sun lit back up. I was quite a moment.
It seems like with this setup, you could set up lights and move them around after pushing the attrib stack instead of having a new light, but I'm not sure.
I also tried texturing this week, but that topic is huge. Hopefully I'll have some results for it next week.
