Ejemplo n.º 1
0
 public void read(JmeImporter im) throws IOException {
   InputCapsule ic = im.getCapsule(this);
   numSamples = ic.readInt("numSamples", 0);
   filters = ic.readSavableArrayList("filters", null);
   for (Filter filter : filters) {
     filter.setProcessor(this);
     setFilterState(filter, filter.isEnabled());
   }
   assetManager = im.getAssetManager();
 }
Ejemplo n.º 2
0
 /**
  * init the given filter
  *
  * @param filter
  * @param vp
  */
 private void initFilter(Filter filter, ViewPort vp) {
   filter.setProcessor(this);
   if (filter.isRequiresDepthTexture()) {
     if (!computeDepth && renderFrameBuffer != null) {
       depthTexture = new Texture2D(width, height, Format.Depth24);
       renderFrameBuffer.setDepthTexture(depthTexture);
     }
     computeDepth = true;
     filter.init(assetManager, renderManager, vp, width, height);
     filter.setDepthTexture(depthTexture);
   } else {
     filter.init(assetManager, renderManager, vp, width, height);
   }
 }