diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-10-05 07:00:04 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-10-05 07:00:04 +0200 |
commit | f88411abc7150ed209efcb6180503f0c6f7c8ef6 (patch) | |
tree | 3c5b38c16a125ad26e6aef74c8a8c5cb85d43205 /texturestbi.cpp | |
parent | 4e5f45f47fa3568f6b081d56f9e7119367fc775c (diff) |
Moved texture loading into base Texture class.
Diffstat (limited to 'texturestbi.cpp')
-rw-r--r-- | texturestbi.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
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 <stdexcept> -#include <SFML/Window/OpenGL.hpp> -#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); -} |