move HWR_LoadLevel to hw_main
This commit is contained in:
1 parent
c98ebc9f35
commit
20e062b031
2 files changed
+19
-11
No files matched your search
@@ -5948,6 +5948,25 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||
HWR_RenderFrame(viewnumber, player, false);
|
||||
}
|
||||
|
||||
void HWR_LoadLevel(void)
|
||||
{
|
||||
// Lactozilla (December 8, 2019)
|
||||
// Level setup used to free EVERY mipmap from memory.
|
||||
// Even mipmaps that aren't related to level textures.
|
||||
// Presumably, the hardware render code used to store textures as level data.
|
||||
// Meaning, they had memory allocated and marked with the PU_LEVEL tag.
|
||||
// Level textures are only reloaded after R_LoadTextures, which is
|
||||
// when the texture list is loaded.
|
||||
|
||||
// Sal: Unfortunately, NOT freeing them causes the dreaded Color Bug.
|
||||
HWR_FreeMipmapCache();
|
||||
|
||||
HWR_CreatePlanePolygons((INT32)numnodes - 1);
|
||||
|
||||
if (HWR_ShouldUsePaletteRendering())
|
||||
HWR_SetMapPalette();
|
||||
}
|
||||
|
||||
// enable or disable palette rendering state depending on settings and availability
|
||||
// called when relevant settings change
|
||||
// shader recompilation is done in the cvar callback
|
||||
|
||||
@@ -3302,17 +3302,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
void HWR_LoadLevel(void)
|
||||
{
|
||||
HWR_FreeMipmapCache();
|
||||
HWR_CreatePlanePolygons((INT32)numnodes - 1);
|
||||
|
||||
if (HWR_ShouldUsePaletteRendering())
|
||||
HWR_SetMapPalette();
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// P_RunSOC
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user