Ver código fonte

Restore Frame Buffer

Sebastien Vandenberghe 8 anos atrás
pai
commit
6a7be8639e

Diferenças do arquivo suprimidas por serem muito extensas
+ 1247 - 1247
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 5 - 5
dist/preview release/customConfigurations/minimalViewer/babylon.js


+ 3 - 1
dist/preview release/customConfigurations/minimalViewer/babylon.max.js

@@ -8289,7 +8289,9 @@ var BABYLON;
         Engine.prototype.restoreDefaultFramebuffer = function () {
             this._currentRenderTarget = null;
             this.bindUnboundFramebuffer(null);
-            this.setViewport(this._cachedViewport);
+            if (this._cachedViewport) {
+                this.setViewport(this._cachedViewport);
+            }
             this.wipeCaches();
         };
         // UBOs

Diferenças do arquivo suprimidas por serem muito extensas
+ 1247 - 1247
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


+ 3 - 2
src/babylon.engine.ts

@@ -1428,8 +1428,9 @@
         public restoreDefaultFramebuffer(): void {
             this._currentRenderTarget = null;
             this.bindUnboundFramebuffer(null);
-
-            this.setViewport(this._cachedViewport);
+            if (this._cachedViewport) {
+                this.setViewport(this._cachedViewport);
+            }
 
             this.wipeCaches();
         }