소스 검색

dispose when pipeline is disposed

Trevor Baron 7 년 전
부모
커밋
7d1dc96407
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

+ 4 - 0
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

@@ -576,6 +576,9 @@
                     if(this.grain){
                         this.grain.dispose(camera);
                     }
+                    if(this._glowLayer){
+                        this._glowLayer.dispose();
+                    }
                 }
             }
             
@@ -591,6 +594,7 @@
                 (<any>this._chromaticAberrationEffect) = null;
                 (<any>this.grain) = null;
                 (<any>this._grainEffect) = null;
+                this._glowLayer = null;
             } 
         }