missing tex

This commit is contained in:
2026-03-16 11:31:06 +01:00
parent f6a1e59ebb
commit 681f53bd95

View File

@@ -10,8 +10,13 @@ namespace Game::Renderer {
SDL_Surface* surf = IMG_Load(path.c_str()); SDL_Surface* surf = IMG_Load(path.c_str());
if (!surf) { if (!surf) {
ERROR("Failed to load image at " << path); ERROR("Failed to load image at " << path);
// Load Missing Texture
surf = IMG_Load("../resources/missing_texture.png");
if (!surf) {
ERROR("Failed to load missing texture image");
return; return;
} }
}
mTex = SDL_CreateTextureFromSurface(renderer, surf); mTex = SDL_CreateTextureFromSurface(renderer, surf);
SDL_DestroySurface(surf); SDL_DestroySurface(surf);