소스 검색

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

Popov72 4 년 전
부모
커밋
00a78c7ab6
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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;
     var renderCount = test.renderCount || 1;
 
+    engine.endFrame();
+
     currentScene.executeWhenReady(function() {
         if (currentScene.activeCamera && currentScene.activeCamera.useAutoRotationBehavior) {
             currentScene.activeCamera.useAutoRotationBehavior = false;
@@ -210,6 +212,8 @@ function runTest(index, done, listname) {
 
     console.log("Running " + (listname ? listname + "/" : "") + test.title);
 
+    engine.beginFrame();
+
     var resultContext = resultCanvas.getContext("2d");
     var img = new Image();
     img.onload = function() {
@@ -409,6 +413,7 @@ function init(engineName) {
                 ]
             }
         });
+        engine.enableOfflineSupport = false;
         return new Promise((resolve) => {
             engine.initAsync(glslangOptions).then(() => resolve());
         });