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
This commit is contained in:
parent
ce6d0d0065
commit
e4e3e0906d
@ -69,7 +69,6 @@ public abstract class Filter implements Savable {
|
|||||||
protected Material material;
|
protected Material material;
|
||||||
protected boolean enabled = true;
|
protected boolean enabled = true;
|
||||||
protected FilterPostProcessor processor;
|
protected FilterPostProcessor processor;
|
||||||
protected boolean debug;
|
|
||||||
|
|
||||||
public Filter(String name) {
|
public Filter(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@ -445,35 +444,13 @@ public abstract class Filter implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return true if this filter is in debug mode
|
* This method is called right after the filter has been rendered to the
|
||||||
* @return
|
* 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.
|
||||||
*/
|
*/
|
||||||
public boolean isDisplayDebug() {
|
protected void postFilter(Renderer r, FrameBuffer buffer){
|
||||||
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.
|
|
||||||
*/
|
|
||||||
protected void displayDebug(){
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
renderProcessing(r, buff, mat);
|
renderProcessing(r, buff, mat);
|
||||||
filter.outputdebug();
|
filter.postFilter(r, buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user