diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/window.cpp | 2 | ||||
-rw-r--r-- | ui/worldOverlay.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ui/window.cpp b/ui/window.cpp index 9ecc88c..3569915 100644 --- a/ui/window.cpp +++ b/ui/window.cpp @@ -1,5 +1,6 @@ #include "window.h"
#include "uiComponent.h"
+#include "worldOverlay.h"
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <stdexcept>
@@ -90,6 +91,7 @@ Window::refresh() const void
Window::render() const
{
+ uiComponents.apply<WorldOverlay>(&WorldOverlay::render, getShader());
glDisable(GL_DEPTH_TEST);
uiComponents.apply(&UIComponent::render, uiShader, UIComponent::Position {});
}
diff --git a/ui/worldOverlay.h b/ui/worldOverlay.h new file mode 100644 index 0000000..028122a --- /dev/null +++ b/ui/worldOverlay.h @@ -0,0 +1,9 @@ +#pragma once + +class Shader; + +class WorldOverlay { +public: + virtual ~WorldOverlay() = default; + virtual void render(const Shader &) const = 0; +}; |