#include #include #include #include "texturesdl.h" TextureSDL::TextureSDL(const char* filename) { SDL_Surface* image = IMG_Load(filename); width = image->w; height = image->h; byte_per_pixel = image->format->BytesPerPixel; data = (unsigned char*)image->pixels; build(); SDL_FreeSurface(image); }