Explorar o código

Make sure the processing done by createScene is performed inside a begin/end frame

Popov72 %!s(int64=4) %!d(string=hai) anos
pai
achega
00a78c7ab6
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      tests/validation/validation.js

+ 5 - 0
tests/validation/validation.js

@@ -148,6 +148,8 @@ function processCurrentScene(test, resultCanvas, result, renderImage, index, wai
     currentScene.useConstantAnimationDeltaTime = true;
     currentScene.useConstantAnimationDeltaTime = true;
     var renderCount = test.renderCount || 1;
     var renderCount = test.renderCount || 1;
 
 
+    engine.endFrame();
+
     currentScene.executeWhenReady(function() {
     currentScene.executeWhenReady(function() {
         if (currentScene.activeCamera && currentScene.activeCamera.useAutoRotationBehavior) {
         if (currentScene.activeCamera && currentScene.activeCamera.useAutoRotationBehavior) {
             currentScene.activeCamera.useAutoRotationBehavior = false;
             currentScene.activeCamera.useAutoRotationBehavior = false;
@@ -210,6 +212,8 @@ function runTest(index, done, listname) {
 
 
     console.log("Running " + (listname ? listname + "/" : "") + test.title);
     console.log("Running " + (listname ? listname + "/" : "") + test.title);
 
 
+    engine.beginFrame();
+
     var resultContext = resultCanvas.getContext("2d");
     var resultContext = resultCanvas.getContext("2d");
     var img = new Image();
     var img = new Image();
     img.onload = function() {
     img.onload = function() {
@@ -409,6 +413,7 @@ function init(engineName) {
                 ]
                 ]
             }
             }
         });
         });
+        engine.enableOfflineSupport = false;
         return new Promise((resolve) => {
         return new Promise((resolve) => {
             engine.initAsync(glslangOptions).then(() => resolve());
             engine.initAsync(glslangOptions).then(() => resolve());
         });
         });