missing tex
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user