]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
renamed r_frame to r_textureframe for better readability and made it
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Jan 2010 20:06:03 +0000 (20:06 +0000)
committerRudolf Polzer <divVerent@alientrap.org>
Wed, 6 Jan 2010 08:37:30 +0000 (09:37 +0100)
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

gl_rmain.c

index a1ac4224bcfba8be92c9344b4b15edaa7594b4e9..0c0b50f12e80685dbddcfa67ce1ce324036c6005 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_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;
@@ -7203,7 +7203,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();
 
@@ -7581,7 +7580,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)
@@ -7702,6 +7700,7 @@ extern qboolean r_shadow_usingdeferredprepass;
 void R_RenderScene(void)
 {
        r_refdef.stats.renders++;
+       r_textureframe++; // used only by R_GetCurrentTexture
 
        R_UpdateFogColor();
 
@@ -8410,9 +8409,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