Skip to content
Snippets Groups Projects
Commit 79965d75 authored by D-AIRY's avatar D-AIRY
Browse files

Added stub for missing textures

parent d43d4489
Branches
Tags
No related merge requests found
File added
......@@ -80,7 +80,10 @@ bool XMETHODCALLTYPE CMaterialSystem::loadTexture(const char *szName, IXTexture
}
IXResourceTexture *pRes = NULL;
if(Core_GetIXCore()->getResourceManager()->getTexture(szFileName, &pRes))
bool useStub = false;
while(true)
{
if(Core_GetIXCore()->getResourceManager()->getTexture(useStub ? "textures/dev/dev_null.dds" : szFileName, &pRes))
{
UINT uWidth = 0;
UINT uHeight = 0;
......@@ -121,6 +124,14 @@ bool XMETHODCALLTYPE CMaterialSystem::loadTexture(const char *szName, IXTexture
return(true);
}
if(useStub)
{
LibReport(REPORT_MSG_LEVEL_FATAL, "Unable to load stub texture (textures/dev/dev_null.dds)! Exiting now!\n");
}
useStub = true;
}
return(false);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment