25 lines
391 B
C++
25 lines
391 B
C++
#include "WindowModule.h"
|
|
|
|
WindowModule::WindowModule(void* h, App& a) : Module(h, a) {
|
|
name = "Window";
|
|
}
|
|
|
|
WindowModule::~WindowModule() {
|
|
delete window;
|
|
delete renderer;
|
|
}
|
|
|
|
void WindowModule::onLoad() {
|
|
window = new Window();
|
|
renderer = new Renderer();
|
|
}
|
|
|
|
void WindowModule::run() {
|
|
|
|
if(window->shouldClose()) {
|
|
app.end();
|
|
}
|
|
|
|
window->doFrame();
|
|
}
|