Fix custom shader loading

This commit is contained in:
Jaime Passos 2020-01-24 16:57:21 -03:00
parent b18c0cfcab
commit 7c4c04ca6a
2 changed files with 4 additions and 10 deletions

View File

@ -6147,6 +6147,7 @@ void HWR_AddSessionCommands(void)
// --------------------------------------------------------------------------
void HWR_Startup(void)
{
INT32 i;
static boolean startupdone = false;
// do this once
@ -6167,9 +6168,9 @@ void HWR_Startup(void)
startupdone = true;
// jimita
HWD.pfnKillShaders();
HWD.pfnLoadShaders();
for (i = 0; i < numwadfiles; i++)
HWR_LoadShaders(i, (wadfiles[i]->type == RET_PK3));
HWD.pfnInitCustomShaders();
}
// --------------------------------------------------------------------------
@ -6596,8 +6597,6 @@ skip_field:
}
}
HWD.pfnInitCustomShaders();
Z_Free(line);
return;
}

View File

@ -788,11 +788,6 @@ UINT16 W_InitFile(const char *filename, boolean mainfile)
wadfiles[numwadfiles] = wadfile;
numwadfiles++; // must come BEFORE W_LoadDehackedLumps, so any addfile called by COM_BufInsertText called by Lua doesn't overwrite what we just loaded
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_LoadShaders(numwadfiles - 1, (wadfile->type == RET_PK3));
#endif
// TODO: HACK ALERT - Load Lua & SOC stuff right here. I feel like this should be out of this place, but... Let's stick with this for now.
switch (wadfile->type)
{