From: havoc havoc@d7cf8633-e32d-0410-b094-e92efae38249 <> Date: Mon, 4 Jan 2010 20:06:03 +0000 (+0000) Subject: UNMERGE X-Git-Tag: xonotic-v0.1.0preview~802 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0dd074b84181722c72a3754aa79f1e157690469;p=xonotic%2Fdarkplaces.git UNMERGE renamed r_frame to r_textureframe for better readability and made it increment on every scene render git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9778 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::unmerge=91fba1f2da941d5a9229048c07cce889774d8d03 --- diff --git a/gl_rmain.c b/gl_rmain.c index 46f83ef4..0ce32d08 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. mempool_t *r_main_mempool; rtexturepool_t *r_main_texturepool; -static int r_textureframe = 0; ///< used only by R_GetCurrentTexture +static int r_frame = 0; ///< used only by R_GetCurrentTexture static qboolean r_loadnormalmap; static qboolean r_loadgloss; @@ -7237,6 +7237,7 @@ void R_HDR_RenderBloomTexture(void) r_refdef.view.width = oldwidth; r_refdef.view.height = oldheight; r_refdef.view.colorscale = oldcolorscale; + r_frame++; // used only by R_GetCurrentTexture R_ResetViewRendering3D(); @@ -7616,6 +7617,7 @@ void R_RenderView(void) { if (r_timereport_active) R_TimeReport("start"); + r_frame++; // used only by R_GetCurrentTexture rsurface.entity = NULL; // used only by R_GetCurrentTexture and RSurf_ActiveWorldEntity/RSurf_ActiveModelEntity if (!r_drawentities.integer) @@ -7736,7 +7738,6 @@ extern qboolean r_shadow_usingdeferredprepass; void R_RenderScene(void) { r_refdef.stats.renders++; - r_textureframe++; // used only by R_GetCurrentTexture R_UpdateFogColor(); @@ -8445,9 +8446,9 @@ texture_t *R_GetCurrentTexture(texture_t *t) dp_model_t *model = ent->model; q3shaderinfo_layer_tcmod_t *tcmod; - if (t->update_lastrenderframe == r_textureframe && t->update_lastrenderentity == (void *)ent) + if (t->update_lastrenderframe == r_frame && t->update_lastrenderentity == (void *)ent) return t->currentframe; - t->update_lastrenderframe = r_textureframe; + t->update_lastrenderframe = r_frame; t->update_lastrenderentity = (void *)ent; // switch to an alternate material if this is a q1bsp animated material