mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- moved the vertex and light data generation back to the render pass for modern OpenGL with persistently mapped buffers.
Having this extra CPU time in there allows for better parallelization with the graphics driver and GPU.
This commit is contained in:
parent
72c7a05ba8
commit
099057b142
2 changed files with 15 additions and 3 deletions
|
@ -256,6 +256,15 @@ void FDrawInfo::RenderTranslucentWall(GLWall *wall)
|
|||
//==========================================================================
|
||||
void FDrawInfo::DrawWall(GLWall *wall, int pass)
|
||||
{
|
||||
if (screen->hwcaps & RFL_BUFFER_STORAGE)
|
||||
{
|
||||
if (level.HasDynamicLights && FixedColormap == CM_DEFAULT && wall->gltexture != nullptr && !(screen->hwcaps & RFL_NO_SHADERS))
|
||||
{
|
||||
wall->SetupLights(this, lightdata);
|
||||
}
|
||||
wall->MakeVertices(this, !!(wall->flags & GLWall::GLWF_TRANSLUCENT));
|
||||
}
|
||||
|
||||
gl_RenderState.SetNormal(wall->glseg.Normal());
|
||||
switch (pass)
|
||||
{
|
||||
|
|
|
@ -183,11 +183,14 @@ void GLWall::PutWall(HWDrawInfo *di, bool translucent)
|
|||
if (di->FixedColormap != CM_DEFAULT || (Colormap.LightColor.isWhite() && lightlevel == 255))
|
||||
flags &= ~GLWF_GLOW;
|
||||
|
||||
if (level.HasDynamicLights && di->FixedColormap == CM_DEFAULT && gltexture != nullptr && !(screen->hwcaps & RFL_NO_SHADERS))
|
||||
if (!(screen->hwcaps & RFL_BUFFER_STORAGE))
|
||||
{
|
||||
SetupLights(di, lightdata);
|
||||
if (level.HasDynamicLights && di->FixedColormap == CM_DEFAULT && gltexture != nullptr && !(screen->hwcaps & RFL_NO_SHADERS))
|
||||
{
|
||||
SetupLights(di, lightdata);
|
||||
}
|
||||
MakeVertices(di, translucent);
|
||||
}
|
||||
MakeVertices(di, translucent);
|
||||
|
||||
|
||||
bool solid;
|
||||
|
|
Loading…
Reference in a new issue