BillySheet/src/main.cpp

32 lines
620 B
C++

#include <spdlog/spdlog.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include "window.hpp"
#include "gui_data.hpp"
#include "gui.hpp"
int main() {
std::ios::sync_with_stdio(false);
spdlog::set_default_logger(spdlog::stdout_color_st("console"));
SPDLOG_DEBUG("Creating Window");
gui::Window window;
gui::GuiData gui_data(window);
try {
gui::Gui gui(gui_data);
while (!window.should_close()) {
glfwPollEvents();
gui.render_gui();
gui.render_gpu();
window.swap_buffers();
}
} catch (const std::exception &e) {
SPDLOG_CRITICAL(e.what());
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}