mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- fixed: P_Recalculate3DFloors may not be called before the vertex buffer has been set up.
Since this function creates dynamic copies for 3D floors that need to be split it requires the vertex buffer index to be set up. In older versions this did not produce errors because there was a fallback render path that was less efficient. Now with that fallback removed this resulted in temporary 3D floors being created without valid vertex data.
This commit is contained in:
parent
91ea22e85a
commit
9c398cd343
2 changed files with 6 additions and 5 deletions
|
@ -891,11 +891,6 @@ void P_Spawn3DFloors (void)
|
|||
line.special=0;
|
||||
line.args[0] = line.args[1] = line.args[2] = line.args[3] = line.args[4] = 0;
|
||||
}
|
||||
// kg3D - do it in software
|
||||
for (auto &sec : level.sectors)
|
||||
{
|
||||
P_Recalculate3DFloors(&sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4116,6 +4116,12 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
|
|||
// This must be done BEFORE the PolyObj Spawn!!!
|
||||
InitRenderInfo(); // create hardware independent renderer resources for the level.
|
||||
screen->mVertexData->CreateVBO();
|
||||
|
||||
for (auto &sec : level.sectors)
|
||||
{
|
||||
P_Recalculate3DFloors(&sec);
|
||||
}
|
||||
|
||||
SWRenderer->SetColormap(); //The SW renderer needs to do some special setup for the level's default colormap.
|
||||
InitPortalGroups();
|
||||
P_InitHealthGroups();
|
||||
|
|
Loading…
Reference in a new issue