Load the error texture when a texture isn't found instead of just passing null to OpenGL!
This commit is contained in:
@@ -12,7 +12,7 @@ Texture* CommonFunctions::LoadTexture(std::string path, bool threaded)
|
|||||||
} catch (const Resource::StillLoadingException&) {
|
} catch (const Resource::StillLoadingException&) {
|
||||||
img = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
|
img = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
img = nullptr;
|
img = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
return img;
|
return img;
|
||||||
|
|||||||
Reference in New Issue
Block a user