summaryrefslogtreecommitdiff
path: root/ui/gameMainWindow.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-11-19 15:04:30 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-11-23 18:38:43 +0000
commitffdaa93edf5eeaf9db7dc17e51554a77dd9d596d (patch)
tree5ec8af60e0761417d4f80a012679e3071de59888 /ui/gameMainWindow.cpp
parentShared context, persist main window in test, send test for upcoming pointlight (diff)
downloadilt-ffdaa93edf5eeaf9db7dc17e51554a77dd9d596d.tar.bz2
ilt-ffdaa93edf5eeaf9db7dc17e51554a77dd9d596d.tar.xz
ilt-ffdaa93edf5eeaf9db7dc17e51554a77dd9d596d.zip
Separate out the illumation of the scene
Diffstat (limited to 'ui/gameMainWindow.cpp')
-rw-r--r--ui/gameMainWindow.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp
index c31265a..0e861b4 100644
--- a/ui/gameMainWindow.cpp
+++ b/ui/gameMainWindow.cpp
@@ -45,9 +45,18 @@ GameMainWindow::tick(TickDuration)
void
GameMainWindow::render() const
{
- SceneRenderer::render([this](const auto & shader) {
- gameState->world.apply<Renderable>(&Renderable::render, shader);
- uiComponents.apply<WorldOverlay>(&WorldOverlay::render, shader);
- });
+ SceneRenderer::render(*this);
Window::render();
}
+void
+GameMainWindow::content(const SceneShader & shader) const
+{
+ gameState->world.apply<Renderable>(&Renderable::render, shader);
+ uiComponents.apply<WorldOverlay>(&WorldOverlay::render, shader);
+}
+void
+GameMainWindow::environment(const SceneShader & s, const SceneRenderer & r) const
+{
+ // default for now
+ SceneRenderer::SceneProvider::environment(s, r);
+}