restructure modules. make GuiModules depend on WindowModule
This commit is contained in:
35
modules/examples/GuiModules/TestClay/src/TestClay.cpp
Normal file
35
modules/examples/GuiModules/TestClay/src/TestClay.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "TestClay.h"
|
||||
|
||||
#define CLAY_IMPLIMENTATION
|
||||
#include "clay.h"
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
TestClay::TestClay(void* h, Archimedes::App& a) : Archimedes::GuiModule(h, a) {
|
||||
|
||||
name = "TestClay";
|
||||
}
|
||||
|
||||
TestClay::~TestClay() {
|
||||
}
|
||||
|
||||
void TestClay::onLoad() {
|
||||
|
||||
createWindow();
|
||||
|
||||
window->getRenderer().init();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void TestClay::run() {
|
||||
|
||||
window->getRenderer().addRenderCmd([](){
|
||||
|
||||
});
|
||||
|
||||
if(window->shouldClose())
|
||||
app.end();
|
||||
window->doFrame();
|
||||
|
||||
}
|
||||
25
modules/examples/GuiModules/TestClay/src/TestClay.h
Normal file
25
modules/examples/GuiModules/TestClay/src/TestClay.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "Archimedes.h"
|
||||
|
||||
|
||||
class TestClay : public Archimedes::GuiModule {
|
||||
|
||||
public:
|
||||
TestClay(void*, Archimedes::App&);
|
||||
|
||||
~TestClay();
|
||||
|
||||
void onLoad();
|
||||
|
||||
void run();
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
extern "C" {
|
||||
Archimedes::Module* create(void* handle, Archimedes::App& app) {
|
||||
return new TestClay(handle, app);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user