ソースを参照

preserverDrawingBuffer = false by default

David Catuhe 10 年 前
コミット
8aa56d9f1e

+ 3 - 0
Babylon/babylon.engine.js

@@ -382,6 +382,9 @@ var BABYLON;
             this._renderingCanvas = canvas;
             this._renderingCanvas = canvas;
             options = options || {};
             options = options || {};
             options.antialias = antialias;
             options.antialias = antialias;
+            if (options.preserveDrawingBuffer === undefined) {
+                options.preserveDrawingBuffer = false;
+            }
             // GL
             // GL
             try {
             try {
                 this._gl = canvas.getContext("webgl", options) || canvas.getContext("experimental-webgl", options);
                 this._gl = canvas.getContext("webgl", options) || canvas.getContext("experimental-webgl", options);

+ 5 - 0
Babylon/babylon.engine.ts

@@ -549,6 +549,11 @@
             options = options || {};
             options = options || {};
             options.antialias = antialias;
             options.antialias = antialias;
 
 
+
+            if (options.preserveDrawingBuffer === undefined) {
+                options.preserveDrawingBuffer = false;
+            }
+
             // GL
             // GL
             try {
             try {
                 this._gl = canvas.getContext("webgl", options) || canvas.getContext("experimental-webgl", options);
                 this._gl = canvas.getContext("webgl", options) || canvas.getContext("experimental-webgl", options);

Preview release/babylon.2.2.d.ts → Preview release - Alpha/babylon.2.2.d.ts


ファイルの差分が大きいため隠しています
+ 2 - 2
Preview release/babylon.2.2.js


+ 4 - 1
Preview release/babylon.2.2.max.js

@@ -5336,6 +5336,9 @@ var BABYLON;
             this._renderingCanvas = canvas;
             this._renderingCanvas = canvas;
             options = options || {};
             options = options || {};
             options.antialias = antialias;
             options.antialias = antialias;
+            if (options.preserveDrawingBuffer === undefined) {
+                options.preserveDrawingBuffer = false;
+            }
             // GL
             // GL
             try {
             try {
                 this._gl = canvas.getContext("webgl", options) || canvas.getContext("experimental-webgl", options);
                 this._gl = canvas.getContext("webgl", options) || canvas.getContext("experimental-webgl", options);
@@ -5538,7 +5541,7 @@ var BABYLON;
         });
         });
         Object.defineProperty(Engine, "Version", {
         Object.defineProperty(Engine, "Version", {
             get: function () {
             get: function () {
-                return "2.1.0";
+                return "2.2.0-alpha";
             },
             },
             enumerable: true,
             enumerable: true,
             configurable: true
             configurable: true

ファイルの差分が大きいため隠しています
+ 2 - 2
Preview release/babylon.2.2.noworker.js


+ 1 - 0
Preview release/what's new.md

@@ -3,6 +3,7 @@
     
     
   - **Updates**
   - **Updates**
     - Depth-of-field improvements [PR](https://github.com/BabylonJS/Babylon.js/pull/567) [jahow](https://github.com/jahow)
     - Depth-of-field improvements [PR](https://github.com/BabylonJS/Babylon.js/pull/567) [jahow](https://github.com/jahow)
+    - Engine now initialize WebGL with preserveDrawingBuffer = false by default [deltakosh](https://github.com/deltakosh)
   - **Bug fixes**
   - **Bug fixes**
  
  
   - **Breaking changes**
   - **Breaking changes**