From: havoc Date: Mon, 4 Jan 2010 20:06:03 +0000 (+0000) Subject: renamed r_frame to r_textureframe for better readability and made it X-Git-Tag: xonotic-v0.1.0preview~801 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4eb6cb707fc8588e2f23cf53dfa51fe09372d599;p=xonotic%2Fdarkplaces.git 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::merge=91fba1f2da941d5a9229048c07cce889774d8d03 --- diff --git a/gl_rmain.c b/gl_rmain.c index 0ce32d08..46f83ef4 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_frame = 0; ///< used only by R_GetCurrentTexture +static int r_textureframe = 0; ///< used only by R_GetCurrentTexture static qboolean r_loadnormalmap; static qboolean r_loadgloss; @@ -7237,7 +7237,6 @@ 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(); @@ -7617,7 +7616,6 @@ 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) @@ -7738,6 +7736,7 @@ extern qboolean r_shadow_usingdeferredprepass; void R_RenderScene(void) { r_refdef.stats.renders++; + r_textureframe++; // used only by R_GetCurrentTexture R_UpdateFogColor(); @@ -8446,9 +8445,9 @@ texture_t *R_GetCurrentTexture(texture_t *t) dp_model_t *model = ent->model; q3shaderinfo_layer_tcmod_t *tcmod; - if (t->update_lastrenderframe == r_frame && t->update_lastrenderentity == (void *)ent) + if (t->update_lastrenderframe == r_textureframe && t->update_lastrenderentity == (void *)ent) return t->currentframe; - t->update_lastrenderframe = r_frame; + t->update_lastrenderframe = r_textureframe; t->update_lastrenderentity = (void *)ent; // switch to an alternate material if this is a q1bsp animated material