summaryrefslogtreecommitdiffstats
path: root/src/graphics/Texture.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-26 16:11:17 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-26 16:11:17 +0200
commit8ac4fe6d5ba5091923c7fdf1fa88724d827706fa (patch)
treea4ce203f671f9b8311d09dd36f1f80ae65799a56 /src/graphics/Texture.cpp
parent2017-05-21 (diff)
downloadAltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.tar
AltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.tar.gz
AltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.tar.bz2
AltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.tar.lz
AltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.tar.xz
AltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.tar.zst
AltCraft-8ac4fe6d5ba5091923c7fdf1fa88724d827706fa.zip
Diffstat (limited to '')
-rw-r--r--src/graphics/Texture.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/graphics/Texture.cpp b/src/graphics/Texture.cpp
index 0104530..bd5c53f 100644
--- a/src/graphics/Texture.cpp
+++ b/src/graphics/Texture.cpp
@@ -1,5 +1,5 @@
-#include <iostream>
#include <SFML/Graphics.hpp>
+#include <easylogging++.h>
#include "Texture.hpp"
Texture::Texture(std::string filename, GLenum textureWrapping, GLenum textureFiltering) {
@@ -10,17 +10,17 @@ Texture::Texture(std::string filename, GLenum textureWrapping, GLenum textureFil
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, textureWrapping);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, textureWrapping);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,textureFiltering);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, textureFiltering);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
//Image load
sf::Image image;
if (!image.loadFromFile(filename)) {
- std::cout << "Can't open image " << filename << std::endl;
+ LOG(ERROR) << "Can't open image " << filename;
throw 201;
}
- if (image.getPixelsPtr()==nullptr){
- std::cout<<"Image data is corrupted!"<<std::endl;
+ if (image.getPixelsPtr() == nullptr) {
+ LOG(ERROR) << "Image data is corrupted!";
throw 202;
}
image.flipVertically();