From 5f202e16ccf3dc284e48a0c6a3916000d816f43b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 28 Dec 2022 14:30:15 +0000 Subject: Render some train bodies to test shadowing --- test/test-render.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/test-render.cpp') diff --git a/test/test-render.cpp b/test/test-render.cpp index 1150a67..ef4dcc6 100644 --- a/test/test-render.cpp +++ b/test/test-render.cpp @@ -6,9 +6,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -77,6 +79,7 @@ public: }; class TestScene : public SceneProvider { + RailVehicleClass train {"brush47"}; Terrain terrain {[]() { auto gd = std::make_shared(GeoData::Limits {{0, 0}, {100, 100}}); gd->generateRandom(); @@ -86,11 +89,20 @@ class TestScene : public SceneProvider { content(const SceneShader & shader) const { terrain.render(shader); + train.render(shader, Location {{52, 50, 2}}, {Location {}, Location {}}); + train.render(shader, Location {{52, 30, 2}}, {Location {}, Location {}}); } void lights(const SceneShader &) const { } + void + shadows(const ShadowMapper & shadowMapper) const + { + terrain.shadows(shadowMapper); + train.shadows(shadowMapper, Location {{52, 50, 2}}); + train.shadows(shadowMapper, Location {{52, 30, 2}}); + } }; BOOST_GLOBAL_FIXTURE(ApplicationBase); -- cgit v1.2.3