Trabajando en el TITULO
This commit is contained in:
@@ -32,6 +32,7 @@ LTexture::~LTexture()
|
||||
// Carga una imagen desde un fichero
|
||||
bool LTexture::loadFromFile(std::string path, SDL_Renderer *renderer)
|
||||
{
|
||||
const std::string filename = path.substr(path.find_last_of("\\/") + 1);
|
||||
int req_format = STBI_rgb_alpha;
|
||||
int width, height, orig_format;
|
||||
unsigned char *data = stbi_load(path.c_str(), &width, &height, &orig_format, req_format);
|
||||
@@ -40,6 +41,10 @@ bool LTexture::loadFromFile(std::string path, SDL_Renderer *renderer)
|
||||
SDL_Log("Loading image failed: %s", stbi_failure_reason());
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Image loaded: %s\n", filename.c_str());
|
||||
}
|
||||
|
||||
int depth, pitch;
|
||||
Uint32 pixel_format;
|
||||
|
||||
Reference in New Issue
Block a user