From 1a2ab86f0789c4b473dad83368c86634e4b7eb2c Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 28 Sep 2010 12:04:38 +0000 Subject: [PATCH] for some reason, it's faster to always set the lightmaptexture (more than double fps) even if fakelight is enabled. LordHavoc, any idea why? git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10504 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index 52572fdf..50b0e725 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -12896,7 +12896,7 @@ static void R_DrawSurface_TransparentCallback(const entity_render_t *ent, const surface = rsurface.modelsurfaces + surfacelist[i]; texture = surface->texture; rsurface.texture = R_GetCurrentTexture(texture); - rsurface.lightmaptexture = FAKELIGHT_ENABLED ? NULL : surface->lightmaptexture; + rsurface.lightmaptexture = surface->lightmaptexture; rsurface.deluxemaptexture = surface->deluxemaptexture; rsurface.uselightmaptexture = surface->lightmaptexture != NULL; // scan ahead until we find a different texture @@ -13002,7 +13002,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in // use skin 1 instead) texture = surfacelist[i]->texture; rsurface.texture = R_GetCurrentTexture(texture); - rsurface.lightmaptexture = FAKELIGHT_ENABLED ? NULL : surfacelist[i]->lightmaptexture; + rsurface.lightmaptexture = surfacelist[i]->lightmaptexture; rsurface.deluxemaptexture = surfacelist[i]->deluxemaptexture; rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL && !depthonly && !prepass; if (!(rsurface.texture->currentmaterialflags & flagsmask) || (rsurface.texture->currentmaterialflags & MATERIALFLAG_NODRAW)) @@ -13066,7 +13066,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa // use skin 1 instead) texture = surfacelist[i]->texture; rsurface.texture = R_GetCurrentTexture(texture); - rsurface.lightmaptexture = FAKELIGHT_ENABLED ? NULL : surfacelist[i]->lightmaptexture; + rsurface.lightmaptexture = surfacelist[i]->lightmaptexture; rsurface.deluxemaptexture = surfacelist[i]->deluxemaptexture; rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL && !depthonly && !prepass; if (!(rsurface.texture->currentmaterialflags & flagsmask) || (rsurface.texture->currentmaterialflags & MATERIALFLAG_NODRAW)) -- 2.39.2