Prechádzať zdrojové kódy

Fix issue with texture optim when gl was used externally

David Catuhe 7 rokov pred
rodič
commit
2b84c3c86d
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/Engine/babylon.engine.ts

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

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