Beginning writing gui and window wrapper for GLFW
This commit is contained in:
parent
10cb797084
commit
9dfe0faa56
8 changed files with 141 additions and 4 deletions
13
src/window.cpp
Normal file
13
src/window.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <stdexcept>
|
||||
#include "window.hpp"
|
||||
|
||||
gui::Window::Window() {
|
||||
glfwSetErrorCallback(nullptr);
|
||||
if (glfwInit() == GLFW_FALSE) {
|
||||
throw std::runtime_error("GLFW init failed.");
|
||||
}
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
|
||||
wwindow = std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)>(glfwCreateWindow(600, 800, "Billy Sheet tracker", nullptr, nullptr),
|
||||
delete_glfw_window);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue