2022-01-08 21:57:17 +01:00
|
|
|
#include <spdlog/spdlog.h>
|
2022-01-09 00:43:33 +01:00
|
|
|
#include <spdlog/sinks/stdout_color_sinks.h>
|
|
|
|
#include "window.hpp"
|
|
|
|
#include "gui_data.hpp"
|
|
|
|
#include "gui.hpp"
|
2022-01-08 20:02:04 +01:00
|
|
|
|
|
|
|
int main() {
|
2022-01-08 21:57:17 +01:00
|
|
|
std::ios::sync_with_stdio(false);
|
2022-01-09 00:43:33 +01:00
|
|
|
spdlog::set_default_logger(spdlog::stdout_color_st("console"));
|
|
|
|
|
|
|
|
try {
|
2022-01-10 21:16:05 +01:00
|
|
|
gui::Window window;
|
|
|
|
gui::GuiData gui_data(window);
|
2022-01-09 00:43:33 +01:00
|
|
|
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;
|
|
|
|
}
|
2022-01-08 20:02:04 +01:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|