summaryrefslogtreecommitdiff
path: root/ui/window.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-12-18 19:28:54 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-12-18 19:28:54 +0000
commitbcdc5c98b356d926939b226a3962d97763295d3b (patch)
treeb56079b97c51e2d457dc68ba3f7ce1cfa867c5d9 /ui/window.cpp
parentNeed a way to select the UI shader (diff)
downloadilt-bcdc5c98b356d926939b226a3962d97763295d3b.tar.bz2
ilt-bcdc5c98b356d926939b226a3962d97763295d3b.tar.xz
ilt-bcdc5c98b356d926939b226a3962d97763295d3b.zip
Window handles UIComponent rendering
Diffstat (limited to 'ui/window.cpp')
-rw-r--r--ui/window.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/window.cpp b/ui/window.cpp
index d9e0467..cd4a202 100644
--- a/ui/window.cpp
+++ b/ui/window.cpp
@@ -1,5 +1,6 @@
#include "window.h"
-#include "ui/inputHandler.h"
+#include "inputHandler.h"
+#include "uiComponent.h"
#include <GL/glew.h>
#include <optional>
#include <stdexcept>
@@ -73,3 +74,11 @@ Window::refresh(const GameState * gameState) const
swapBuffers();
}
+
+void
+Window::render(const GameState *) const
+{
+ uiShader.use();
+ glDisable(GL_DEPTH_TEST);
+ inputStack.apply<UIComponent>(&UIComponent::render, uiShader);
+}