summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/gameMainWindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp
index 0b30cad..3f85a4f 100644
--- a/ui/gameMainWindow.cpp
+++ b/ui/gameMainWindow.cpp
@@ -51,6 +51,11 @@ GameMainWindow::render() const
void
GameMainWindow::content(const SceneShader & shader) const
{
+ for (const auto & [id, asset] : gameState->assets) {
+ if (const auto r = std::dynamic_pointer_cast<const Renderable>(asset)) {
+ r->render(shader);
+ }
+ }
gameState->world.apply<Renderable>(&Renderable::render, shader);
uiComponents.apply<WorldOverlay>(&WorldOverlay::render, shader);
}
@@ -68,5 +73,10 @@ GameMainWindow::lights(const SceneShader & shader) const
void
GameMainWindow::shadows(const ShadowMapper & shadowMapper) const
{
+ for (const auto & [id, asset] : gameState->assets) {
+ if (const auto r = std::dynamic_pointer_cast<const Renderable>(asset)) {
+ r->shadows(shadowMapper);
+ }
+ }
gameState->world.apply<Renderable>(&Renderable::shadows, shadowMapper);
}