diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-04-05 15:05:36 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-04-05 15:05:36 +0100 |
commit | aeeca45ae53c2382354f26fb4dae02fbda62b314 (patch) | |
tree | 04e94114d58b2fa726943c590d3261ed472507ea /yage/core/imageloader.cpp | |
parent | 0d10ba12062144a270a368ef9bffd88517a6c27c (diff) | |
download | YAGE-aeeca45ae53c2382354f26fb4dae02fbda62b314.tar.gz YAGE-aeeca45ae53c2382354f26fb4dae02fbda62b314.zip |
Adding test abstraction and fixing tests
Diffstat (limited to 'yage/core/imageloader.cpp')
-rw-r--r-- | yage/core/imageloader.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/yage/core/imageloader.cpp b/yage/core/imageloader.cpp index 23bc9a25..4cd583d1 100644 --- a/yage/core/imageloader.cpp +++ b/yage/core/imageloader.cpp @@ -10,22 +10,28 @@ #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 { Texture ImageLoader::loadPng(const std::string &file_path) { int width, height, num_channels; + yLogDebug << "Loading image from disk: " << file_path; unsigned char *data = stbi_load(file_path.c_str(), &width, &height, &num_channels, 0); - + 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); |