mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2025-02-12 11:38:51 +00:00
[PATCH] remove _gl_lightmap_sort cvar
Benchmarking didn't show any noticable difference, so removing this cvar and code path. Signed-off-by: Tyrann <tyrann@disenchant.net>
This commit is contained in:
parent
aba56091ac
commit
aa84c0d8f7
@ -116,7 +116,6 @@ cvar_t gl_playermip = { "gl_playermip", "0" };
|
||||
cvar_t gl_nocolors = { "gl_nocolors", "0" };
|
||||
cvar_t gl_doubleeyes = { "gl_doubleeyes", "1" };
|
||||
|
||||
cvar_t _gl_lightmap_sort = { "_gl_lightmap_sort", "0" };
|
||||
cvar_t _gl_allowgammafallback = { "_gl_allowgammafallback", "1" };
|
||||
|
||||
/*
|
||||
|
@ -210,7 +210,6 @@ R_Init(void)
|
||||
Cvar_RegisterVariable(&gl_clear);
|
||||
Cvar_RegisterVariable(&gl_texsort);
|
||||
|
||||
Cvar_RegisterVariable(&_gl_lightmap_sort);
|
||||
Cvar_RegisterVariable(&_gl_allowgammafallback);
|
||||
Cvar_RegisterVariable(&_gl_drawhull);
|
||||
|
||||
|
@ -120,7 +120,6 @@ cvar_t gl_flashblend = { "gl_flashblend", "1" };
|
||||
cvar_t gl_playermip = { "gl_playermip", "0" };
|
||||
cvar_t gl_nocolors = { "gl_nocolors", "0" };
|
||||
|
||||
cvar_t _gl_lightmap_sort = { "_gl_lightmap_sort", "0" };
|
||||
cvar_t _gl_allowgammafallback = { "_gl_allowgammafallback", "1" };
|
||||
|
||||
/*
|
||||
|
@ -210,7 +210,6 @@ R_Init(void)
|
||||
Cvar_RegisterVariable(&gl_clear);
|
||||
Cvar_RegisterVariable(&gl_texsort);
|
||||
|
||||
Cvar_RegisterVariable(&_gl_lightmap_sort);
|
||||
Cvar_RegisterVariable(&_gl_allowgammafallback);
|
||||
Cvar_RegisterVariable(&_gl_drawhull);
|
||||
|
||||
|
@ -1345,76 +1345,23 @@ GL_BuildLightmaps(void)
|
||||
t1 = Sys_DoubleTime();
|
||||
cnt = 0;
|
||||
|
||||
if (_gl_lightmap_sort.value) {
|
||||
/*
|
||||
* Create texture chains so that lightmaps get allocated in texture
|
||||
* order. That way, surfaces with the same textures are more likely to
|
||||
* be allocated in the same lightmap block and hence we will need less
|
||||
* state changes when rendering
|
||||
* FIXME - benchmark & pick one when texsort + multitexture is done).
|
||||
*/
|
||||
for (j = 1; j < MAX_MODELS; j++) {
|
||||
msurface_t *surf;
|
||||
texture_t *t;
|
||||
for (j = 1; j < MAX_MODELS; j++) {
|
||||
m = cl.model_precache[j];
|
||||
if (!m)
|
||||
break;
|
||||
if (m->name[0] == '*')
|
||||
continue;
|
||||
|
||||
m = cl.model_precache[j];
|
||||
if (!m)
|
||||
break;
|
||||
if (m->name[0] == '*')
|
||||
r_pcurrentvertbase = m->vertexes;
|
||||
currentmodel = m;
|
||||
for (i = 0; i < m->numsurfaces; i++) {
|
||||
cnt++;
|
||||
GL_CreateSurfaceLightmap(m->surfaces + i);
|
||||
if (m->surfaces[i].flags & SURF_DRAWTURB)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < m->numtextures; i++) {
|
||||
t = m->textures[i];
|
||||
if (t)
|
||||
t->texturechain = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < m->numsurfaces; i++) {
|
||||
surf = m->surfaces + i;
|
||||
surf->texturechain = surf->texinfo->texture->texturechain;
|
||||
surf->texinfo->texture->texturechain = surf;
|
||||
}
|
||||
|
||||
r_pcurrentvertbase = m->vertexes;
|
||||
currentmodel = m;
|
||||
|
||||
for (i = 0; i < m->numtextures; i++) {
|
||||
t = m->textures[i];
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
for (surf = t->texturechain; surf; surf = surf->texturechain) {
|
||||
cnt++;
|
||||
GL_CreateSurfaceLightmap(surf);
|
||||
if (surf->flags & SURF_DRAWTURB)
|
||||
continue;
|
||||
if (surf->flags & SURF_DRAWSKY)
|
||||
continue;
|
||||
BuildSurfaceDisplayList(surf);
|
||||
}
|
||||
t->texturechain = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
for (j = 1; j < MAX_MODELS; j++) {
|
||||
m = cl.model_precache[j];
|
||||
if (!m)
|
||||
break;
|
||||
|
||||
if (m->name[0] == '*')
|
||||
if (m->surfaces[i].flags & SURF_DRAWSKY)
|
||||
continue;
|
||||
r_pcurrentvertbase = m->vertexes;
|
||||
currentmodel = m;
|
||||
for (i = 0; i < m->numsurfaces; i++) {
|
||||
cnt++;
|
||||
GL_CreateSurfaceLightmap(m->surfaces + i);
|
||||
if (m->surfaces[i].flags & SURF_DRAWTURB)
|
||||
continue;
|
||||
if (m->surfaces[i].flags & SURF_DRAWSKY)
|
||||
continue;
|
||||
BuildSurfaceDisplayList(m->surfaces + i);
|
||||
}
|
||||
BuildSurfaceDisplayList(m->surfaces + i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,6 @@ extern cvar_t gl_flashblend;
|
||||
extern cvar_t gl_nocolors;
|
||||
extern cvar_t gl_finish;
|
||||
|
||||
extern cvar_t _gl_lightmap_sort;
|
||||
extern cvar_t _gl_allowgammafallback;
|
||||
extern cvar_t _gl_drawhull;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user