Compiles, not run yet.
This commit is contained in:
		
					parent
					
						
							
								9dfe0faa56
							
						
					
				
			
			
				commit
				
					
						01697f9df4
					
				
			
		
					 6 changed files with 94 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1 @@
 | 
			
		|||
//
 | 
			
		||||
// Created by postaron on 08/01/2022.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#include "gui_data.hpp"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,13 @@
 | 
			
		|||
#include <stdexcept>
 | 
			
		||||
#include "window.hpp"
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
#include <spdlog/spdlog.h>
 | 
			
		||||
 | 
			
		||||
static void glfwErrorCallback(int error, const char *message) {
 | 
			
		||||
	spdlog::error("Error code {}: {}", error, message);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gui::Window::Window() {
 | 
			
		||||
	glfwSetErrorCallback(nullptr);
 | 
			
		||||
	glfwSetErrorCallback(glfwErrorCallback);
 | 
			
		||||
	if (glfwInit() == GLFW_FALSE) {
 | 
			
		||||
		throw std::runtime_error("GLFW init failed.");
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue