mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 11:01:36 +00:00
- added a CVAR to disable per-plane rendering.
This will require some comparisons on older hardware. On my Geforce 1060 rendering the full plane with one draw call is clearly faster in all cases I tested.
This commit is contained in:
parent
cc65490062
commit
5cffa8873a
1 changed files with 4 additions and 2 deletions
|
@ -48,6 +48,8 @@
|
|||
#include "gl/scene/gl_scenedrawer.h"
|
||||
#include "gl/renderer/gl_quaddrawer.h"
|
||||
|
||||
CVAR(Bool, gl_render_subsectors, false, 0)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Flats
|
||||
|
@ -165,7 +167,7 @@ void FDrawInfo::ProcessLights(GLFlat *flat, bool istrans)
|
|||
{
|
||||
flat->dynlightindex = GLRenderer->mLights->GetIndexPtr();
|
||||
|
||||
if (flat->sector->ibocount > 0)
|
||||
if (flat->sector->ibocount > 0 && !gl_render_subsectors)
|
||||
{
|
||||
SetupSectorLights(flat, GLPASS_LIGHTSONLY, nullptr);
|
||||
}
|
||||
|
@ -212,7 +214,7 @@ void FDrawInfo::DrawSubsectors(GLFlat *flat, int pass, bool processlights, bool
|
|||
if (gl.legacyMode) processlights = false;
|
||||
|
||||
auto vcount = flat->sector->ibocount;
|
||||
if (vcount > 0)
|
||||
if (vcount > 0 && !gl_render_subsectors)
|
||||
{
|
||||
if (processlights) SetupSectorLights(flat, GLPASS_ALL, &dli);
|
||||
drawcalls.Clock();
|
||||
|
|
Loading…
Reference in a new issue