瀏覽代碼

better rendertotexture checks

David Catuhe 8 年之前
父節點
當前提交
0359b5b637
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/babylon.engine.ts

+ 4 - 4
src/babylon.engine.ts

@@ -529,10 +529,6 @@
                 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
             if (!options.disableWebGL2Support) {
                 try {
@@ -560,6 +556,10 @@
                 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._windowIsBackground = true;
             };