From: divverent Date: Wed, 29 Sep 2010 07:10:44 +0000 (+0000) Subject: Revert "for some reason, it's faster to always set the lightmaptexture (more than... X-Git-Tag: xonotic-v0.1.0preview~56^2~112 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=02de8946ccfab1fffc695735152d2a97cccee2a6;p=xonotic%2Fdarkplaces.git Revert "for some reason, it's faster to always set the lightmaptexture (more than double fps) even if fakelight is enabled. LordHavoc, any idea why?" This reverts commit 1a2ab86f0789c4b473dad83368c86634e4b7eb2c. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10505 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 50b0e725..52572fdf 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 = surface->lightmaptexture; + rsurface.lightmaptexture = FAKELIGHT_ENABLED ? NULL : 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 = surfacelist[i]->lightmaptexture; + rsurface.lightmaptexture = FAKELIGHT_ENABLED ? NULL : 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 = surfacelist[i]->lightmaptexture; + rsurface.lightmaptexture = FAKELIGHT_ENABLED ? NULL : 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))