From e4e3e0906da1874847871cc4770a2f08fc616fe1 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Sun, 12 Jan 2014 19:31:56 +0000 Subject: [PATCH] Removed the displayDebug method from the Filter and made a postFilter method for a more general use that is called right after a filter has been rendered. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10982 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/post/Filter.java | 37 ++++--------------- .../com/jme3/post/FilterPostProcessor.java | 2 +- 2 files changed, 8 insertions(+), 31 deletions(-) diff --git a/engine/src/core/com/jme3/post/Filter.java b/engine/src/core/com/jme3/post/Filter.java index 3512d7e3e..a7cb93d37 100644 --- a/engine/src/core/com/jme3/post/Filter.java +++ b/engine/src/core/com/jme3/post/Filter.java @@ -69,7 +69,6 @@ public abstract class Filter implements Savable { protected Material material; protected boolean enabled = true; protected FilterPostProcessor processor; - protected boolean debug; public Filter(String name) { this.name = name; @@ -445,35 +444,13 @@ public abstract class Filter implements Savable { } /** - * return true if this filter is in debug mode - * @return - */ - public boolean isDisplayDebug() { - return debug; - } - - /** - * set to true if you want this filtre in debig mode. - * The method displayDebug will be called by the FilterPostProcessor after - * the filter has been rendered.allowing you to output anything. - * @param displayDebug - */ - public void setDisplayDebug(boolean displayDebug) { - this.debug = displayDebug; - } - - /** - * internal use only - */ - protected void outputdebug(){ - if(debug){ - displayDebug(); - } - } - - /** - * override this method if you want to diplay some debugging info on screen. + * This method is called right after the filter has been rendered to the + * framebuffer. + * Note that buffer will be null if the filter is the last one in the stack + * and has been rendered to screen + * @param r the renderer + * @param buffer the framebuffer on hich the filtre has been rendered. */ - protected void displayDebug(){ + protected void postFilter(Renderer r, FrameBuffer buffer){ } } diff --git a/engine/src/core/com/jme3/post/FilterPostProcessor.java b/engine/src/core/com/jme3/post/FilterPostProcessor.java index 216eb2d13..df863e79c 100644 --- a/engine/src/core/com/jme3/post/FilterPostProcessor.java +++ b/engine/src/core/com/jme3/post/FilterPostProcessor.java @@ -280,7 +280,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { } renderProcessing(r, buff, mat); - filter.outputdebug(); + filter.postFilter(r, buff); } } }