Example #1
0
 public static void setMaxLightCount(Light.Type lightType, int count) {
   DefaultShader.Config config = shaderProvider.config;
   if (lightType.equals(Light.Type.POINT)) config.numPointLights = count;
   else if (lightType.equals(Light.Type.SUN)) config.numDirectionalLights = count;
   else config.numSpotLights = count;
   shaderProvider
       .deleteShaders(); // Get rid of the old shaders, as they need to be recreated for the new
                         // light count.
 }
Example #2
0
 public static int getMaxLightCount(Light.Type lightType) {
   DefaultShader.Config config = shaderProvider.config;
   if (lightType.equals(Light.Type.POINT)) return config.numPointLights;
   else if (lightType.equals(Light.Type.SUN)) return config.numDirectionalLights;
   else return config.numSpotLights;
 }