Skip to content

Commit

Permalink
Fix 3D rule-based rendering test
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jan 15, 2020
1 parent c868768 commit 878dfc1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/src/3d/testqgs3drendering.cpp
Expand Up @@ -453,8 +453,14 @@ void TestQgs3DRendering::testRuleBasedRenderer()
engine.setRootEntity( scene );

scene->cameraController()->setLookingAtPoint( QgsVector3D( 0, 0, 250 ), 500, 45, 0 );
QImage img = Qgs3DUtils::captureSceneImage( engine, scene );

// When running the test, it would sometimes return partially rendered image.
// It is probably based on how fast qt3d manages to upload the data to GPU...
// Capturing the initial image and throwing it away fixes that. Hopefully we will
// find a better fix in the future.
Qgs3DUtils::captureSceneImage( engine, scene );

QImage img = Qgs3DUtils::captureSceneImage( engine, scene );
QVERIFY( renderCheck( "rulebased", img, 40 ) );
}

Expand Down

0 comments on commit 878dfc1

Please sign in to comment.