@metsfan: Maybe you misunderstood me, I have already done a lot of things other than lights, so I don't really need to start graphics programming from the beginning.
The thing that I don't have experience with is shader, I thought I could use FFP light but I couldn't since I can't use it while using shaders.
I will not use another game engine since I have already programmed almost 60%-70% of the game engine, so it's not wise to just throw what I have done so far away.
BTW, when I ask for code samples, it doesn't mean that I'm lazy, it means that I want to get the idea on how it should be done.
@Migi0027: I have heard I could pass light array to the shader, why would I test for collision? why not just pass the light array and calculate the final light accordingly?