Pārlūkot izejas kodu

Fix gpu.dispose()

David Catuhe 7 gadi atpakaļ
vecāks
revīzija
04ddd5a61f
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      src/Particles/babylon.gpuParticleSystem.ts

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

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