diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-06-22 00:14:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 00:14:10 +0100 |
commit | b1673de1b46bd2e566b7c66197ad989d0323f061 (patch) | |
tree | 2cbfdab552025af7a8772069b9f9935f9c9f387f /yage/core | |
parent | 39ef9c1cbe660a8369a33eb0ba13cc15be4cfa15 (diff) | |
parent | 3702e753a5f7b31c31261c968757e19e808a84ec (diff) | |
download | YAGE-b1673de1b46bd2e566b7c66197ad989d0323f061.tar.gz YAGE-b1673de1b46bd2e566b7c66197ad989d0323f061.zip |
Merge pull request #19 from ymherklotz/develop
Develop
Diffstat (limited to 'yage/core')
-rw-r--r-- | yage/core/imageloader.cpp | 5 | ||||
-rw-r--r-- | yage/core/window.cpp | 3 | ||||
-rw-r--r-- | yage/core/window.h | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/yage/core/imageloader.cpp b/yage/core/imageloader.cpp index 4905bf5e..d3c978c1 100644 --- a/yage/core/imageloader.cpp +++ b/yage/core/imageloader.cpp @@ -11,15 +11,11 @@ #include "../data/texture.h" #include "logger.h" #include "stb_image.h" -#include <iostream> #include <glad/glad.h> -#include <iostream> #include <stdexcept> -using std::cout; - namespace yage { @@ -32,7 +28,6 @@ Texture ImageLoader::loadPng(const std::string &file_path) yLogDebug << "Sucessfully loaded file"; Texture texture(0, static_cast<int>(width), static_cast<int>(height)); yLogDebug << "Creating texture"; - cout << "Hello"; glGenTextures(1, &texture.id); glBindTexture(GL_TEXTURE_2D, texture.id); diff --git a/yage/core/window.cpp b/yage/core/window.cpp index 25f9f834..392d4363 100644 --- a/yage/core/window.cpp +++ b/yage/core/window.cpp @@ -61,6 +61,7 @@ void Window::create(std::string window_name, int width, int height) // set key callback glfwSetKeyCallback(window_, key_callback); + // set resize callback glfwSetFramebufferSizeCallback(window_, framebuffer_size_callback); @@ -108,7 +109,7 @@ void Window::pollEvents() const glfwPollEvents(); } -bool Window::keyPressed(key k) +bool Window::keyPressed(key k) const { if (window_ == nullptr) { throw runtime_error("Window is not initialized"); diff --git a/yage/core/window.h b/yage/core/window.h index 2ffafba8..6b0e7fed 100644 --- a/yage/core/window.h +++ b/yage/core/window.h @@ -56,7 +56,7 @@ public: bool shouldClose(); void pollEvents() const; - bool keyPressed(key k); + bool keyPressed(key k) const; }; } // namespace yage |