forked from jaildesigner-jailgames/jaildoctors_dilemma
Ja pinta cosetes per pantalla
This commit is contained in:
@@ -586,22 +586,4 @@ void fillTextureWithColor(SDL_Renderer *renderer, SDL_Texture *texture, Uint8 r,
|
||||
|
||||
// Restaurar el render target previo
|
||||
SDL_SetRenderTarget(renderer, previous_target);
|
||||
}
|
||||
|
||||
// Crea un SDL_Texture
|
||||
SDL_Texture *createTexture(SDL_Renderer *renderer, int width, int height, Uint32 format, int access, bool logError)
|
||||
{
|
||||
// Crear la textura
|
||||
SDL_Texture *texture = SDL_CreateTexture(renderer, format, access, width, height);
|
||||
if (texture == nullptr)
|
||||
{
|
||||
// Registrar el error si está habilitado
|
||||
if (logError)
|
||||
{
|
||||
std::cerr << "Error: Texture could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return texture;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user