diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-09-25 17:46:30 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-09-25 17:46:30 +0100 |
commit | 5e6067f74e7ac072656f11ead0f22ec7f8e9c525 (patch) | |
tree | ca9e3758832d68ea1d9cf531c48d1962532d8dfa /yage/base/imageloader.cpp | |
parent | 619746d51e91f02e7c5327f0c65ebb5952632bc7 (diff) | |
download | YAGE-5e6067f74e7ac072656f11ead0f22ec7f8e9c525.tar.gz YAGE-5e6067f74e7ac072656f11ead0f22ec7f8e9c525.zip |
Testing spritesheet
Diffstat (limited to 'yage/base/imageloader.cpp')
-rw-r--r-- | yage/base/imageloader.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/yage/base/imageloader.cpp b/yage/base/imageloader.cpp index 0d7d5df9..e1d54dc1 100644 --- a/yage/base/imageloader.cpp +++ b/yage/base/imageloader.cpp @@ -6,10 +6,16 @@ * ---------------------------------------------------------------------------- */ -#include <yage/base/imageloader.h> +#include "imageloader.h" + +#ifndef UNIT_TESTS +#include <glad/glad.h> +#endif + #include <yage/base/iomanager.h> #include <yage/base/picopng.h> +#include <iostream> #include <stdexcept> namespace yage @@ -33,7 +39,8 @@ Texture ImageLoader::loadPng(const std::string &file_path) std::to_string(error_code)); } - Texture texture{0, (int)width, (int)height}; + Texture texture(0, static_cast<int>(width), static_cast<int>(height)); + std::cout << "Geometry: " << texture.width << "x" << texture.height << "\n"; glGenTextures(1, &texture.id); |