]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
UNMERGE
authorhavoc havoc@d7cf8633-e32d-0410-b094-e92efae38249 <>
Mon, 4 Jan 2010 20:06:03 +0000 (20:06 +0000)
committerRudolf Polzer <rpolzer@grawp.div0.qc.to>
Sun, 24 Jan 2010 18:13:20 +0000 (19:13 +0100)
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

gl_rmain.c

index 46f83ef44b954aec30bb6320e7eeadcb359e2933..0ce32d08f0d5947fab5708471fb166a441738c33 100644 (file)
@@ -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