Little bug with light's?

With that call (from an extend from SimpleGame, Version 0.7):



LoggingSystem.getLogger().log(Level.INFO,"What Light = "+

display.getRenderer().createLightState().getType());



I await a value from a PointLight flag (Light.LT_POINT=2), but i got the

value from the SpotLight flag (Light.LT_SPOT=3).



In SimpleGame, there is only created a PointLight but no SpotLight,

how can it be, that i got a SpotLight flag in return.

Does i overseen something?

First thing, display.getRenderer().createLightState() creates a new light state, it does not retrieve the lights that are currently being used. So, it’s a brand new light state. Next, you are saying get type, it’s returning (3 which is RS_LIGHT). You are asking what type of state it is, not what kind of light.



If you need to find the type of light you are dealing with:



lightState is the state defined in SimpleGame…



for(int i = 0; i < lightState.getQuantity(); i++) {
   LoggingSystem.getLogger().log(Level.INFO,"What Light = "+
   lightState.get(i).getType());
}