Fix custom shader loading
This commit is contained in:
parent
b18c0cfcab
commit
7c4c04ca6a
|
@ -6147,6 +6147,7 @@ void HWR_AddSessionCommands(void)
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
void HWR_Startup(void)
|
void HWR_Startup(void)
|
||||||
{
|
{
|
||||||
|
INT32 i;
|
||||||
static boolean startupdone = false;
|
static boolean startupdone = false;
|
||||||
|
|
||||||
// do this once
|
// do this once
|
||||||
|
@ -6167,9 +6168,9 @@ void HWR_Startup(void)
|
||||||
|
|
||||||
startupdone = true;
|
startupdone = true;
|
||||||
|
|
||||||
// jimita
|
for (i = 0; i < numwadfiles; i++)
|
||||||
HWD.pfnKillShaders();
|
HWR_LoadShaders(i, (wadfiles[i]->type == RET_PK3));
|
||||||
HWD.pfnLoadShaders();
|
HWD.pfnInitCustomShaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
@ -6596,8 +6597,6 @@ skip_field:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWD.pfnInitCustomShaders();
|
|
||||||
|
|
||||||
Z_Free(line);
|
Z_Free(line);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -788,11 +788,6 @@ UINT16 W_InitFile(const char *filename, boolean mainfile)
|
||||||
wadfiles[numwadfiles] = wadfile;
|
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
|
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.
|
// 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)
|
switch (wadfile->type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue