diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-11-16 22:01:32 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-11-16 22:01:32 +0000 |
commit | 994e65e5a80c814c2ffe6da66a356228e37f35f4 (patch) | |
tree | bc1b09ff6781df3f2bd0cd6ee7c23b8668e5ce86 /yage/core/window.cpp | |
parent | 714ed292b37a0d9baee69186bca38cf0f0c77c89 (diff) | |
download | YAGE-994e65e5a80c814c2ffe6da66a356228e37f35f4.tar.gz YAGE-994e65e5a80c814c2ffe6da66a356228e37f35f4.zip |
Fixing license headers
Diffstat (limited to 'yage/core/window.cpp')
-rw-r--r-- | yage/core/window.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/yage/core/window.cpp b/yage/core/window.cpp index 9774bf9e..94e9f763 100644 --- a/yage/core/window.cpp +++ b/yage/core/window.cpp @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- * window.cpp * - * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License - * See file LICENSE for more details + * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> + * MIT License, see LICENSE file for more details. * ---------------------------------------------------------------------------- */ @@ -10,14 +10,13 @@ #include <stdexcept> - - namespace yage { -void key_callback(GLFWwindow *window, int key, int scanCode, int action, int mods) +void key_callback(GLFWwindow *window, int key, int scanCode, int action, + int mods) { - if(key == GLFW_KEY_E && action == GLFW_PRESS) { + if (key == GLFW_KEY_E && action == GLFW_PRESS) { glClearColor(0.5f, 0.f, 0.f, 1.f); } else { glClearColor(0.f, 0.5f, 0.f, 1.f); @@ -34,7 +33,7 @@ Window::~Window() void Window::create(std::string window_name, int width, int height) { - if(glfwInit() == GLFW_FALSE) { + if (glfwInit() == GLFW_FALSE) { throw std::runtime_error("GLFW Initialisation failed"); } @@ -51,7 +50,7 @@ void Window::create(std::string window_name, int width, int height) glfwMakeContextCurrent(window_); // initialize glad - gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); + gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); // set key callback glfwSetKeyCallback(window_, key_callback); |