summaryrefslogtreecommitdiff
path: root/ui/gameMainWindow.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 13:51:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 14:14:13 +0000
commit7fba471728f2216d7e3b7900297fc3b3531e286c (patch)
tree5caef3b2efc23aefccb215ec9005cd8e7d2e91b8 /ui/gameMainWindow.cpp
parentFix todo for handling a terrain walk from outside the mesh (diff)
parentModel positions as integers (diff)
downloadilt-7fba471728f2216d7e3b7900297fc3b3531e286c.tar.bz2
ilt-7fba471728f2216d7e3b7900297fc3b3531e286c.tar.xz
ilt-7fba471728f2216d7e3b7900297fc3b3531e286c.zip
Merge branch 'ints' into terrain
Conflicts fix, compiles, some test failures remain. Trees not added, possibility of OM invalid handle assertion failures, normals broken due to integer overflow in Newell's method.
Diffstat (limited to 'ui/gameMainWindow.cpp')
-rw-r--r--ui/gameMainWindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp
index 6981c54..d71c74a 100644
--- a/ui/gameMainWindow.cpp
+++ b/ui/gameMainWindow.cpp
@@ -31,8 +31,8 @@ public:
GameMainWindow::GameMainWindow(size_t w, size_t h) :
Window {w, h, "I Like Trains", SDL_WINDOW_OPENGL}, SceneRenderer {Window::size, 0}
{
- uiComponents.create<ManualCameraController>(glm::vec2 {315000, 495000});
- auto gms = uiComponents.create<GameMainSelector>(&camera, glm::vec2 {w, h});
+ uiComponents.create<ManualCameraController>(glm::vec2 {315'000'000, 495'000'000});
+ auto gms = uiComponents.create<GameMainSelector>(&camera, ScreenAbsCoord {w, h});
uiComponents.create<GameMainToolbar>(gms.get());
}
@@ -48,6 +48,7 @@ GameMainWindow::render() const
SceneRenderer::render(*this);
Window::render();
}
+
void
GameMainWindow::content(const SceneShader & shader) const
{
@@ -59,17 +60,20 @@ 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
SceneProvider::environment(s, r);
}
+
void
GameMainWindow::lights(const SceneShader & shader) const
{
gameState->world.apply<Renderable>(&Renderable::lights, shader);
}
+
void
GameMainWindow::shadows(const ShadowMapper & shadowMapper) const
{