move test guis to GUImodules and separate utils from modules

This commit is contained in:
2025-03-21 12:01:19 -05:00
parent 028162509e
commit 719af8e85a
11 changed files with 23 additions and 3 deletions

View File

@@ -2,15 +2,22 @@
#define GUIMODULE_H #define GUIMODULE_H
#include "Module.h" #include "Module.h"
#include "Window/Window.h"
class GuiModule : Module { class GuiModule : Module {
public: public:
typedef GuiModule* create_t(); typedef GuiModule* create_t();
typedef void destroy_t(GuiModule*);
GuiModule(void* h, App& a) : Module(h, a) {
deps["Window"] = "";
}
virtual ~GuiModule() {} virtual ~GuiModule() {}
virtual void load() = 0;
virtual void run() = 0; virtual void run() = 0;
private:
Window window;
}; };

View File

@@ -1,10 +1,10 @@
#include "Archimedes.h" #include "Window/Window.h"
#define GLEW_STATIC #define GLEW_STATIC
#include <GL/glew.h> #include <GL/glew.h>
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
class Window { class WindowGLFW : public Window {
public: public:

13
utils/Window/Window.h Normal file
View File

@@ -0,0 +1,13 @@
#include "Archimedes.h"
class Window {
public:
virtual ~Window() {};
virtual bool shouldClose() = 0;
virtual void doFrame() = 0;
};