TMP / Made {GLFW,Vulkan}Managers more OO

This commit is contained in:
2023-03-27 21:33:09 +02:00
parent 50e3a44a81
commit 54f73b2e44
10 changed files with 179 additions and 106 deletions

View File

@@ -1,11 +1,22 @@
#pragma once
#include <functional>
#include <memory>
namespace progressia::desktop {
void initializeGlfw();
void showWindow();
void shutdownGlfw();
bool shouldRun();
void doGlfwRoutine();
class GlfwManager {
public:
virtual ~GlfwManager(){};
virtual void setOnScreenResize(std::function<void()>) = 0;
virtual void showWindow() = 0;
virtual bool shouldRun() = 0;
virtual void doGlfwRoutine() = 0;
};
std::shared_ptr<GlfwManager> makeGlfwManager();
} // namespace progressia::desktop