From f88411abc7150ed209efcb6180503f0c6f7c8ef6 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Tue, 5 Oct 2010 07:00:04 +0200 Subject: Moved texture loading into base Texture class. --- texturestbi.cpp | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 texturestbi.cpp (limited to 'texturestbi.cpp') diff --git a/texturestbi.cpp b/texturestbi.cpp deleted file mode 100644 index abd802e..0000000 --- a/texturestbi.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include "texturestbi.h" -#include "stb_image.h" - -TextureSTBI::TextureSTBI(const char* filename) { - int w, h, ch; - uint8_t* data = stbi_load(filename, &w, &h, &ch, 4); - - unsigned int format; - if(ch == 4) { - format = GL_RGBA; - } else { - format = GL_RGB; - } - - build(data, format, w, h); - - stbi_image_free(data); -} -- cgit v1.2.3