فهرست منبع

Added getter & setter for FilterPostProcessor.depthFormat (#1841)

* Added setter for FilterPostProcessor.depthFormat

* Added getter for FilterPostProcessor.depthFormat
JosiahGoeman 3 سال پیش
والد
کامیت
5ae543cc6f
1فایلهای تغییر یافته به همراه24 افزوده شده و 1 حذف شده
  1. 24 1
      jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java

+ 24 - 1
jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java

@@ -86,7 +86,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
     private AppProfiler prof;
 
     private Format fbFormat = Format.RGB111110F;
-    final private Format depthFormat = Format.Depth;
+    private Format depthFormat = Format.Depth;
 
     /**
      * Create a FilterProcessor
@@ -550,10 +550,33 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
         this.assetManager = assetManager;
     }
 
+    /**
+     * Sets the format to be used for the internal frame buffer's color buffer
+     *
+     * @param fbFormat the format
+     */
     public void setFrameBufferFormat(Format fbFormat) {
         this.fbFormat = fbFormat;
     }
 
+    /**
+     * Sets the format to be used for the internal frame buffer's depth buffer
+     *
+     * @param depthFormat the format
+     */
+    public void setFrameBufferDepthFormat(Format depthFormat) {
+        this.depthFormat = depthFormat;
+    }
+
+    /**
+     * Returns the depth format currently used for the internal frame buffer's depth buffer
+     * 
+     * @return the depth format
+     */
+    public Format getFrameBufferDepthFormat() {
+        return depthFormat;
+    }
+
     @Override
     @SuppressWarnings("unchecked")
     public void write(JmeExporter ex) throws IOException {