forked from jaildesigner-jailgames/jaildoctors_dilemma
Afegint smart pointers
Actualitzat Resources Actualitzades les classes Sprite i derivades Afegida nova tipografia Actualitzat Asset Actualitzat Text
This commit is contained in:
@@ -78,10 +78,18 @@ bool Texture::loadFromFile(const std::string &file_path)
|
||||
|
||||
int depth, pitch;
|
||||
Uint32 pixel_format;
|
||||
// STBI_rgb_alpha (RGBA)
|
||||
depth = 32;
|
||||
pitch = 4 * width;
|
||||
pixel_format = SDL_PIXELFORMAT_RGBA32;
|
||||
/*if (req_format == STBI_rgb)
|
||||
{
|
||||
depth = 24;
|
||||
pitch = 3 * width; // 3 bytes por pixel * pixels por linea
|
||||
pixel_format = SDL_PIXELFORMAT_RGB24;
|
||||
}
|
||||
else*/
|
||||
{ // STBI_rgb_alpha (RGBA)
|
||||
depth = 32;
|
||||
pitch = 4 * width;
|
||||
pixel_format = SDL_PIXELFORMAT_RGBA32;
|
||||
}
|
||||
|
||||
// Limpia
|
||||
unloadTexture();
|
||||
|
||||
Reference in New Issue
Block a user