Jelajahi Sumber

Fix issue with texture optim when gl was used externally

David Catuhe 7 tahun lalu
induk
melakukan
2b84c3c86d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/Engine/babylon.engine.ts

+ 1 - 1
src/Engine/babylon.engine.ts

@@ -1347,7 +1347,7 @@
         public resetTextureCache() {
             for (var key in this._boundTexturesCache) {
                 let boundTexture = this._boundTexturesCache[key];
-                if (boundTexture) {
+                if (!this.disableTextureBindingOptimization && boundTexture) {
                     this._removeDesignatedSlot(boundTexture);
                 }
                 this._boundTexturesCache[key] = null;