summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-render.cpp12
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);