summaryrefslogtreecommitdiff
path: root/test/test-assetFactory.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-21 23:52:56 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-21 23:52:56 +0100
commitab5b46dbe58ae0401c24ead55a2627b9a577fc1a (patch)
tree8c2d20920186a636f33c471bd1bfa515ea9de2af /test/test-assetFactory.cpp
parentSwitch to render trees in bulk through foliage asset rendering (diff)
downloadilt-ab5b46dbe58ae0401c24ead55a2627b9a577fc1a.tar.bz2
ilt-ab5b46dbe58ae0401c24ead55a2627b9a577fc1a.tar.xz
ilt-ab5b46dbe58ae0401c24ead55a2627b9a577fc1a.zip
Instances buffer data needs to be unmapped before use
Here we change quite a bit to support mapping and unmapping the buffer as required. The instance/free referencing is still broken though. We add several instances of tree in the render.
Diffstat (limited to 'test/test-assetFactory.cpp')
-rw-r--r--test/test-assetFactory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp
index 817654b..82a1825 100644
--- a/test/test-assetFactory.cpp
+++ b/test/test-assetFactory.cpp
@@ -107,7 +107,10 @@ BOOST_AUTO_TEST_CASE(foliage, *boost::unit_test::timeout(5))
auto tree_01_1_f = std::dynamic_pointer_cast<Foliage>(tree_01_1);
BOOST_REQUIRE(tree_01_1_f);
- auto plant = std::make_shared<Plant>(tree_01_1_f, Location {{-2, 2, 0}, {}});
+ auto plant1 = std::make_shared<Plant>(tree_01_1_f, Location {{-2, 2, 0}, {0, 0, 0}});
+ auto plant2 = std::make_shared<Plant>(tree_01_1_f, Location {{3, -4, 0}, {0, 1, 0}});
+ auto plant3 = std::make_shared<Plant>(tree_01_1_f, Location {{-2, -4, 0}, {0, 2, 0}});
+ auto plant4 = std::make_shared<Plant>(tree_01_1_f, Location {{3, 2, 0}, {0, 3, 0}});
objects.objects.push_back(tree_01_1_f);
render(5);