Closed chelinho139 closed 7 years ago
Update:
I solve by removing this line: RayHandler.setGammaCorrection(true);
Very odd, cause this method doesn't affect the lights count. Btw, some of static methods of ray handler, must be called before instance creation, so - that one should be called before you are instantiating the RayHandler:
RayHandler.setGammaCorrection(true);
It affects the shaders loading, and setting it to true
after the shader is loaded with gamma correction set to false
, might lead to issues. Could you please try to set them before creating the ray handler, and check if issues still occurs?
Also, the following line is not needed, as it will be called by rayHandler.dispose()
internally:
rayHandler.getLightMapBuffer().dispose();
Hello, I have a big problem.
I have a main menu screen and a game screen.
The menu screen has no lights. The game screen is the only one that has lights.
Every time I go from the game screen to the menu screen and back to the game, the lights are duplicated.
Example: Main Menu -> Game (ok) Main Menu -> Game -> Main Menu -> Game (all lights get duplicated)
I know it may sound stupid, but no, i am properly disposing everything. Even I checked with the debugger and breakpoint the rayhandler class, it has the correct number of lights (in the array: lights) but still all the lights get duplicated.
I will show you my code:
Init:
`
and dispose:
`
I cant figure out how to solve it. and every time the lights start to duplicate, triplicate, and so on. its horrible!
Please help me!