Begin Repo

This commit is contained in:
2024-08-10 21:20:28 -05:00
commit 08115f90ce
41 changed files with 19581 additions and 0 deletions

47
src/application.cpp Normal file
View File

@@ -0,0 +1,47 @@
#include "application.h"
App* App::instance = nullptr;
App::App() {
if(instance != nullptr) {
std::cout << "App already exists\nThere can only be one!\n";
std::abort();
}
std::cout << "Initializing...\n";
instance = this;
window.init("test", 640, 640);
renderer.init();
}
App::~App() {
lStack.shutdown();
renderer.shutdown();
window.shutdown();
std::cout << "\nExiting...";
}
void App::run() {
std::cout << "\nTesting...\n";
lStack.pushLayer(new BaseLayer());
lStack.pushOverlay(new Overlay());
// Main loop
while (!done) {
lStack.propagateEvent(window.pollEvents());
renderer.draw();
}
}