mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- removed gl_render_subsectors test CVAR and disabled vertex buffer generation for legacy mode
To reduce the performance impact, legacy mode will now always create flat vertex data on the fly instead of relying on the vertex buffer. This makes the CVAR mostly redundant as on anything more modern rendering per subsector will always be slower.
This commit is contained in:
parent
b612e182b4
commit
044c8a2034
2 changed files with 14 additions and 13 deletions
|
@ -249,7 +249,10 @@ void FFlatVertexBuffer::Unmap()
|
|||
void FFlatVertexBuffer::CreateVBO()
|
||||
{
|
||||
vbo_shadowdata.Resize(mNumReserved);
|
||||
if (!gl.legacyMode)
|
||||
{
|
||||
FFlatVertexGenerator::CreateVertices();
|
||||
}
|
||||
mCurIndex = mIndex = vbo_shadowdata.Size();
|
||||
Map();
|
||||
memcpy(map, &vbo_shadowdata[0], vbo_shadowdata.Size() * sizeof(FFlatVertex));
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
#include "gl/scene/gl_scenedrawer.h"
|
||||
#include "gl/renderer/gl_quaddrawer.h"
|
||||
|
||||
CVAR(Bool, gl_render_subsectors, false, 0)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Flats
|
||||
|
@ -167,7 +165,7 @@ void FDrawInfo::ProcessLights(GLFlat *flat, bool istrans)
|
|||
{
|
||||
flat->dynlightindex = GLRenderer->mLights->GetIndexPtr();
|
||||
|
||||
if (flat->sector->ibocount > 0 && !gl_render_subsectors && !gl_RenderState.GetClipLineShouldBeActive())
|
||||
if (flat->sector->ibocount > 0 && !gl_RenderState.GetClipLineShouldBeActive())
|
||||
{
|
||||
SetupSectorLights(flat, GLPASS_LIGHTSONLY, nullptr);
|
||||
}
|
||||
|
@ -214,7 +212,7 @@ void FDrawInfo::DrawSubsectors(GLFlat *flat, int pass, bool processlights, bool
|
|||
if (gl.legacyMode) processlights = false;
|
||||
|
||||
auto vcount = flat->sector->ibocount;
|
||||
if (vcount > 0 && !gl_render_subsectors && !gl_RenderState.GetClipLineShouldBeActive())
|
||||
if (vcount > 0 && !gl_RenderState.GetClipLineShouldBeActive())
|
||||
{
|
||||
if (processlights) SetupSectorLights(flat, GLPASS_ALL, &dli);
|
||||
drawcalls.Clock();
|
||||
|
|
Loading…
Reference in a new issue