diff options
Diffstat (limited to 'engine/texturesdl.cpp')
-rw-r--r-- | engine/texturesdl.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/engine/texturesdl.cpp b/engine/texturesdl.cpp deleted file mode 100644 index bab760b..0000000 --- a/engine/texturesdl.cpp +++ /dev/null @@ -1,23 +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); - - width = image->w; - height = image->h; - - if(image->format->BytesPerPixel == 4) { - format = image->format->Bshift ? GL_RGBA : GL_BGRA; - } else { - format = image->format->Bshift ? GL_RGB : GL_BGR; - } - - data = (unsigned char*)image->pixels; - - build(); - - SDL_FreeSurface(image); -} |