2
votes

I'm already familiar with OpenGL's native lights.

My question is how do I go about rendering lights with Cg? Do I still need to declare normal OpenGL lights and then use Cg to render the light?Or is it all done with Cg?

If you could point me to some reading material about lighting with Cg that would be great also.

1

1 Answers

0
votes

Well, after some experimenting, I figured out that you don't need to use any OpenGL ligthing directive. All you need to do is write a vertex shader and give it the parameters needed for the lights: light position, light color. You can also send reflectance and shininess parameters for each object to simulate the way you declare material properties in opengl.