File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1357,6 +1357,32 @@ defineSuite([
1357
1357
scene . destroyForSpecs ( ) ;
1358
1358
} ) ;
1359
1359
1360
+ it ( 'changing the camera frustum does not cause continuous rendering in requestRenderMode' , function ( ) {
1361
+ var scene = createScene ( ) ;
1362
+
1363
+ scene . renderForSpecs ( ) ;
1364
+
1365
+ var lastRenderTime = JulianDate . clone ( scene . lastRenderTime , scratchTime ) ;
1366
+ expect ( lastRenderTime ) . toBeDefined ( ) ;
1367
+ expect ( scene . _renderRequested ) . toBe ( false ) ;
1368
+
1369
+ scene . requestRenderMode = true ;
1370
+ scene . maximumRenderTimeChange = undefined ;
1371
+
1372
+ scene . camera . frustum . near *= 1.1 ;
1373
+
1374
+ // Render once properly
1375
+ scene . renderForSpecs ( ) ;
1376
+ expect ( scene . lastRenderTime ) . not . toEqual ( lastRenderTime ) ;
1377
+
1378
+ // Render again - but this time nothing should happen.
1379
+ lastRenderTime = JulianDate . clone ( scene . lastRenderTime , scratchTime ) ;
1380
+ scene . renderForSpecs ( ) ;
1381
+ expect ( scene . lastRenderTime ) . toEqual ( lastRenderTime ) ;
1382
+
1383
+ scene . destroyForSpecs ( ) ;
1384
+ } ) ;
1385
+
1360
1386
it ( 'successful completed requests causes a new frame to be rendered in requestRenderMode' , function ( ) {
1361
1387
var scene = createScene ( ) ;
1362
1388
You can’t perform that action at this time.
0 commit comments