From c6217d8b43b6ddf360485f9ba3b731a783482eaa Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 12 Jun 2018 06:45:25 +0100 Subject: Making function `const` --- yage/core/window.cpp | 3 ++- yage/core/window.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'yage/core') 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 -- cgit From 8e038f0114a6a2f6d2971ac9772bd0a053e3ccef Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 22 Jun 2018 00:07:08 +0100 Subject: Removing iostream --- yage/core/imageloader.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'yage/core') 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 #include -#include #include -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(width), static_cast(height)); yLogDebug << "Creating texture"; - cout << "Hello"; glGenTextures(1, &texture.id); glBindTexture(GL_TEXTURE_2D, texture.id); -- cgit