You don't need to redraw your objects for every light.
You can follow this algorithm:
[source lang="java"]Color finalColor;for every lightif(light is spotLight)finalColor += shadeSpotLight(currentLight);else if (light is omni)finalColor += shadeOmniLight(currentLight);...[/source]
This should be implemented in your pixel shader.
When you became familiar with shaders You can use a Deferred Lighting technique which is much more appropriate for multiple lights.
esoufianeMember Since 05 Sep 2012
Offline Last Active Today, 02:50 PM