From 4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Thu, 18 May 2017 19:03:05 +0500 Subject: 2017-05-18 --- graphics/Texture.cpp | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 graphics/Texture.cpp (limited to 'graphics/Texture.cpp') diff --git a/graphics/Texture.cpp b/graphics/Texture.cpp deleted file mode 100644 index 0104530..0000000 --- a/graphics/Texture.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include "Texture.hpp" - -Texture::Texture(std::string filename, GLenum textureWrapping, GLenum textureFiltering) { - glGenTextures(1, &texture); - glBindTexture(GL_TEXTURE_2D, texture); - - //Texture options - 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_MAG_FILTER, GL_NEAREST); - - //Image load - sf::Image image; - if (!image.loadFromFile(filename)) { - std::cout << "Can't open image " << filename << std::endl; - throw 201; - } - if (image.getPixelsPtr()==nullptr){ - std::cout<<"Image data is corrupted!"<