Przeglądaj źródła

better rendertotexture checks

David Catuhe 8 lat temu
rodzic
commit
0359b5b637
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      src/babylon.engine.ts

+ 4 - 4
src/babylon.engine.ts

@@ -529,10 +529,6 @@
                 options.preserveDrawingBuffer = false;
                 options.preserveDrawingBuffer = false;
             }
             }
 
 
-            // Checks if some of the format renders first to allow the use of webgl inspector.
-            var renderToFullFloat = this._canRenderToFloatTexture();
-            var renderToHalfFloat = this._canRenderToHalfFloatTexture();
-
             // GL
             // GL
             if (!options.disableWebGL2Support) {
             if (!options.disableWebGL2Support) {
                 try {
                 try {
@@ -560,6 +556,10 @@
                 throw new Error("WebGL not supported");
                 throw new Error("WebGL not supported");
             }
             }
 
 
+            // Checks if some of the format renders first to allow the use of webgl inspector.
+            var renderToFullFloat = this._canRenderToFloatTexture();
+            var renderToHalfFloat = this._canRenderToHalfFloatTexture();
+            
             this._onBlur = () => {
             this._onBlur = () => {
                 this._windowIsBackground = true;
                 this._windowIsBackground = true;
             };
             };