FilterPostProcessor incorrectly re-inializing all attached filters

If all the attached filters get disabled, they all get reinitialized during the next render.

I think this is because :

  1. Filter.setEnabled calls processor.setFilterState(this, enabled);
  2. FilterPostProcessor.setFilterState calls updateLastFilterIndex();
  3. which caluclates the last index to be -1 and calls cleanup();
  4. FilterPostProcessor.cleanup sets viewPort = null;
  5. then, in the not to distant future, RenderManager.renderViewPort() is called;
  6. which checks if the process is initalized: if (!proc.isInitialized()) {
  7. which returns return viewPort != null;...which is false due to #4
  8. so RenderManager reInializes FitlerPostProcessor
  9. which calls reshape(vp, cam.getWidth(), cam.getHeight());
  10. which reinitializes all attached filters

should be fixed now

1 Like