mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 05:41:52 +00:00
upload deluxemaps only if we're actually using bumpmapping. This might help drop texture memory and boost fps slightly. Probably not by much, however.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1322 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
8c38072cbb
commit
a294161ce5
1 changed files with 15 additions and 13 deletions
|
@ -1991,7 +1991,6 @@ dynamic:
|
|||
if ((theRect->h + theRect->t) < (fa->light_t + tmax))
|
||||
theRect->h = (fa->light_t-theRect->t)+tmax;
|
||||
|
||||
|
||||
lightmap[fa->lightmaptexturenum]->deluxmodified = true;
|
||||
theRect = &lightmap[fa->lightmaptexturenum]->deluxrectchange;
|
||||
if (fa->light_t < theRect->t) {
|
||||
|
@ -3158,13 +3157,13 @@ void R_DrawWorld (void)
|
|||
GLR_RecursiveWorldNode (cl.worldmodel->nodes);
|
||||
|
||||
RSpeedEnd(RSPEED_WORLDNODE);
|
||||
|
||||
TRACE(("dbg: calling PPL_DrawWorld\n"));
|
||||
// if (r_shadows.value >= 2 && gl_canstencil && gl_mtexable)
|
||||
PPL_DrawWorld();
|
||||
// else
|
||||
// DrawTextureChains (cl.worldmodel, 1, r_refdef.vieworg);
|
||||
|
||||
|
||||
qglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
|
||||
GLR_LessenStains();
|
||||
|
@ -3851,17 +3850,20 @@ void GL_BuildLightmaps (void)
|
|||
, LMBLOCK_WIDTH, LMBLOCK_HEIGHT, 0,
|
||||
gl_lightmap_format, GL_UNSIGNED_BYTE, lightmap[i]->lightmaps);
|
||||
|
||||
lightmap[i]->deluxmodified = false;
|
||||
lightmap[i]->deluxrectchange.l = LMBLOCK_WIDTH;
|
||||
lightmap[i]->deluxrectchange.t = LMBLOCK_HEIGHT;
|
||||
lightmap[i]->deluxrectchange.w = 0;
|
||||
lightmap[i]->deluxrectchange.h = 0;
|
||||
GL_Bind(deluxmap_textures[i]);
|
||||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
qglTexImage2D (GL_TEXTURE_2D, 0, 3
|
||||
, LMBLOCK_WIDTH, LMBLOCK_HEIGHT, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, lightmap[i]->deluxmaps);
|
||||
if (gl_bump.value)
|
||||
{
|
||||
lightmap[i]->deluxmodified = false;
|
||||
lightmap[i]->deluxrectchange.l = LMBLOCK_WIDTH;
|
||||
lightmap[i]->deluxrectchange.t = LMBLOCK_HEIGHT;
|
||||
lightmap[i]->deluxrectchange.w = 0;
|
||||
lightmap[i]->deluxrectchange.h = 0;
|
||||
GL_Bind(deluxmap_textures[i]);
|
||||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
qglTexImage2D (GL_TEXTURE_2D, 0, 3
|
||||
, LMBLOCK_WIDTH, LMBLOCK_HEIGHT, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, lightmap[i]->deluxmaps);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue