From aeeca45ae53c2382354f26fb4dae02fbda62b314 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 5 Apr 2018 15:05:36 +0100 Subject: Adding test abstraction and fixing tests --- yage/core/imageloader.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'yage/core/imageloader.cpp') 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 #include #include #include +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(width), static_cast(height)); + yLogDebug << "Creating texture"; + cout << "Hello"; glGenTextures(1, &texture.id); glBindTexture(GL_TEXTURE_2D, texture.id); -- cgit