Always functional.

Design : the controller controls data of the character sheet and also saving and reading data.
This commit is contained in:
Pcornat 2022-01-17 22:00:26 +01:00
parent 84450d25af
commit b759836989
Signed by: Pcornat
GPG key ID: 2F3932FF46D9ECA0
16 changed files with 8011 additions and 23 deletions

View file

@ -1,6 +1,6 @@
#include "gui/window.hpp"
#include <stdexcept>
#include "spdlog/spdlog.h"
#include <spdlog/spdlog.h>
static void glfwErrorCallback(int error, const char *message) {
SPDLOG_CRITICAL("Error code{}: {}", error, message);
@ -27,6 +27,13 @@ gui::Window::Window() {
throw std::runtime_error("GLFW failed. See log.");
}
glfwMakeContextCurrent(wwindow.get());
glewExperimental = true;
if (glewInit() != GLEW_OK) {
wwindow.reset(nullptr);
glfwTerminate();
SPDLOG_CRITICAL("GLEW loader failed.");
throw std::runtime_error("GLEW failed. See log.");
}
glfwSwapInterval(1); // VSync on
glfwSetFramebufferSizeCallback(wwindow.get(), framebufferCallback);