diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-09 01:01:52 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-09 01:01:52 +0000 |
commit | f39019c7f12d2eaa90f8b56709df47bb35773e8e (patch) | |
tree | df0d6113fcf2ae7d08e1f7214beebef94fb19939 /test | |
parent | Add a generic persistence perf test (diff) | |
download | ilt-f39019c7f12d2eaa90f8b56709df47bb35773e8e.tar.bz2 ilt-f39019c7f12d2eaa90f8b56709df47bb35773e8e.tar.xz ilt-f39019c7f12d2eaa90f8b56709df47bb35773e8e.zip |
Hugely more detailed Brush47 model and revision to test case details
Specifically, this includes the buffer block, which is a rotated cuboid
with an extrusion. This feature breaks the current mesh creation code...
Fix coming up.
Diffstat (limited to 'test')
-rw-r--r-- | test/test-assetFactory.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp index ae5a88a..204ffb3 100644 --- a/test/test-assetFactory.cpp +++ b/test/test-assetFactory.cpp @@ -21,7 +21,7 @@ BOOST_GLOBAL_FIXTURE(ApplicationBase); BOOST_GLOBAL_FIXTURE(TestMainWindow); const std::filesystem::path TMP {"/tmp"}; -class FactoryFixture : public TestRenderOutputSize<glm::ivec2 {2048, 2048}>, public SceneProvider { +class FactoryFixture : public TestRenderOutputSize<glm::ivec2 {2048, 1024}>, public SceneProvider { public: FactoryFixture() : sceneRenderer {size, output} { } ~FactoryFixture() @@ -45,8 +45,8 @@ public: void environment(const SceneShader &, const SceneRenderer & sceneRenderer) const override { - sceneRenderer.setAmbientLight({.2, .2, .2}); - sceneRenderer.setDirectionalLight({.3, .3, .3}, east + south + south + down, *this); + sceneRenderer.setAmbientLight({.4, .4, .4}); + sceneRenderer.setDirectionalLight({.6, .6, .6}, east + south + south + down, *this); } void shadows(const ShadowMapper & mapper) const override @@ -57,7 +57,7 @@ public: void render(float dist = 10.f) { - sceneRenderer.camera.setView({dist, dist, dist}, south + west + down); + sceneRenderer.camera.setView({-dist, dist * 1.2f, dist * 1.2f}, south + east + down); sceneRenderer.render(*this); } Collection<const Renderable> objects; @@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(brush47xml) { auto mf = AssetFactory::loadXML(RESDIR "/brush47.xml"); BOOST_REQUIRE(mf); - BOOST_REQUIRE_EQUAL(6, mf->shapes.size()); + BOOST_REQUIRE_GE(mf->shapes.size(), 6); BOOST_CHECK(mf->shapes.at("plane")); BOOST_CHECK(mf->shapes.at("cylinder")); BOOST_CHECK(mf->shapes.at("cuboid")); @@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(brush47xml) auto bogie = mf->shapes.at("bogie"); BOOST_REQUIRE(bogie); auto bogieObj = std::dynamic_pointer_cast<const Object>(bogie); - BOOST_CHECK_EQUAL(3, bogieObj->uses.size()); + BOOST_CHECK_GE(bogieObj->uses.size(), 3); BOOST_CHECK_EQUAL(1, mf->assets.size()); auto brush47 = mf->assets.at("brush-47"); BOOST_REQUIRE(brush47); @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE(brush47xml) auto railVehicle = std::make_shared<RailVehicle>(brush47rvc); objects.objects.push_back(railVehicle); - render(20); + render(); } BOOST_AUTO_TEST_SUITE_END(); |