From: divverent Date: Tue, 28 Sep 2010 12:04:38 +0000 (+0000) Subject: for some reason, it's faster to always set the lightmaptexture (more than double... X-Git-Tag: xonotic-v0.1.0preview~56^2~113 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a2ab86f0789c4b473dad83368c86634e4b7eb2c;p=xonotic%2Fdarkplaces.git 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 --- 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))