diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-12-28 14:30:15 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-12-28 14:30:15 +0000 |
commit | 5f202e16ccf3dc284e48a0c6a3916000d816f43b (patch) | |
tree | e6c080826dcbbb09ffedef7277cbc2f44ee08cb1 | |
parent | Add two new array helpers (diff) | |
download | ilt-5f202e16ccf3dc284e48a0c6a3916000d816f43b.tar.bz2 ilt-5f202e16ccf3dc284e48a0c6a3916000d816f43b.tar.xz ilt-5f202e16ccf3dc284e48a0c6a3916000d816f43b.zip |
Render some train bodies to test shadowing
-rw-r--r-- | test/test-render.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <game/geoData.h> #include <game/terrain.h> +#include <game/vehicles/railVehicleClass.h> #include <gfx/gl/sceneRenderer.h> #include <gfx/models/texture.h> #include <lib/glArrays.h> +#include <location.hpp> #include <maths.h> #include <stream_support.hpp> #include <ui/applicationBase.h> @@ -77,6 +79,7 @@ public: }; class TestScene : public SceneProvider { + RailVehicleClass train {"brush47"}; Terrain terrain {[]() { auto gd = std::make_shared<GeoData>(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); |