libgdx/libgdx — pull request #329 by xoppa (2013-04-01 21:19:49+00:00)
Title: New3dapi: Remove static TestShader.lightsCount

Up until now we used a "hack" to enable/disable lighting. This PR better defines how lighting is enabled/disabled:

If Renderable#lights is null, lighting should be disabled for that renderable (think skyboxes etc.). TestShader#canRender now tests on this. GLES10Shader now simply enables/disables lighting if needed (could be optimized).

If Renderable#lights is an (empty) array (even if the items within that array are all null), lighting should be enabled for that renderable.

As for TestShader the maximum number of lights allowed is set by the ShaderProvider (which should be more than 0 for Renderable#light != null).

Still, the Light class some attention. We could also just add a Vector3 direction, float angle, etc. and call it a day for now.