aboutsummaryrefslogtreecommitdiffstats
path: root/yage/core/imageloader.cpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-04-05 15:05:36 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-04-05 15:05:36 +0100
commitaeeca45ae53c2382354f26fb4dae02fbda62b314 (patch)
tree04e94114d58b2fa726943c590d3261ed472507ea /yage/core/imageloader.cpp
parent0d10ba12062144a270a368ef9bffd88517a6c27c (diff)
downloadYAGE-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.cpp8
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);