I’m having an issue disabling my filters. Here is an example below.
fogFilter = new FogFilter(control.getFogColor(),control.getFogDensity(), control.getFogDistance());
filter.addFilter(fogFilter);
fogFilter.setEnabled(false);
There is an odd issue here. This line causes a crash when used in the application initialization for simpleApp or AbstractAppState.
fogFilter.setEnabled(false);
What is odd is after the file is loaded if I call I call this line from the main loop such as update , onAction , etc it works.
If I try to disable the filter during initialization the the application freezes forcing me manually shut it down.
My loading process is.
.j3o file
input set up
physics set up
camera set up
effects set up
I’m not sure if it my order or if this is a known issue. I even tried calling this as the last line in my set up but it still fails. It only seems to work after the app is loaded and the first frame is processed. The filter works but it won’t let me disable it in the initialization process in my simpleApp or any AbstractAppStates.