summaryrefslogtreecommitdiff
path: root/texturesdl.cpp
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-10-02 03:43:27 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-10-02 03:43:27 +0200
commit8e0a72184085aa6e3e741ad5d79f5db2e63d63a6 (patch)
treef7924997c55e98ced990fc24e19b48ec0fedb535 /texturesdl.cpp
parentbf4827f46f22b4df0fa2ddd6716fd59247f9e1bb (diff)
Replaced TextureSDL with TextureSTBI.
Diffstat (limited to 'texturesdl.cpp')
-rw-r--r--texturesdl.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/texturesdl.cpp b/texturesdl.cpp
deleted file mode 100644
index 94e1e2d..0000000
--- a/texturesdl.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdexcept>
-#include <SDL/SDL_image.h>
-#include <SDL/SDL_opengl.h>
-#include "texturesdl.h"
-
-TextureSDL::TextureSDL(const char* filename) {
- SDL_Surface* image = IMG_Load(filename);
-
- unsigned int format;
- if(image->format->BytesPerPixel == 4) {
- format = image->format->Bshift ? GL_RGBA : GL_BGRA;
- } else {
- format = image->format->Bshift ? GL_RGB : GL_BGR;
- }
-
- build(image->pixels, format, image->w, image->h);
-
- SDL_FreeSurface(image);
-}