瀏覽代碼

Fix gpu.dispose()

David Catuhe 7 年之前
父節點
當前提交
04ddd5a61f
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/Particles/babylon.gpuParticleSystem.ts

+ 6 - 1
src/Particles/babylon.gpuParticleSystem.ts

@@ -1194,7 +1194,12 @@
             if (this._limitVelocityGradientsTexture) {
             if (this._limitVelocityGradientsTexture) {
                 this._limitVelocityGradientsTexture.dispose();
                 this._limitVelocityGradientsTexture.dispose();
                 (<any>this._limitVelocityGradientsTexture) = null;
                 (<any>this._limitVelocityGradientsTexture) = null;
-            }         
+            }                   
+
+            if (this._dragGradientsTexture) {
+                this._dragGradientsTexture.dispose();
+                (<any>this._dragGradientsTexture) = null;
+            }               
          
          
             if (this._randomTexture) {
             if (this._randomTexture) {
                 this._randomTexture.dispose();
                 this._randomTexture.dispose();