]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
attempt to fix white flicker when r_water is toggled
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 24 Jan 2010 18:19:03 +0000 (18:19 +0000)
committerRudolf Polzer <divVerent@alientrap.org>
Mon, 25 Jan 2010 08:09:07 +0000 (09:09 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9845 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=115601248b48a32c5ab5a078a07a4e5f36ea7850

gl_rmain.c

index 46f83ef44b954aec30bb6320e7eeadcb359e2933..d139cec09f936bbfcee29a5fcefd46b91b7e9c43 100644 (file)
@@ -7616,6 +7616,7 @@ void R_RenderView(void)
 {
        if (r_timereport_active)
                R_TimeReport("start");
+       r_textureframe++; // used only by R_GetCurrentTexture
        rsurface.entity = NULL; // used only by R_GetCurrentTexture and RSurf_ActiveWorldEntity/RSurf_ActiveModelEntity
 
        if (!r_drawentities.integer)
@@ -7675,7 +7676,11 @@ void R_RenderView(void)
 
        // this produces a bloom texture to be used in R_BlendView() later
        if (r_hdr.integer && r_bloomstate.bloomwidth)
+       {
                R_HDR_RenderBloomTexture();
+               // we have to bump the texture frame again because r_refdef.view.colorscale is cached in the textures
+               r_textureframe++; // used only by R_GetCurrentTexture
+       }
 
        r_refdef.view.showdebug = true;
 
@@ -7736,7 +7741,6 @@ extern qboolean r_shadow_usingdeferredprepass;
 void R_RenderScene(void)
 {
        r_refdef.stats.renders++;
-       r_textureframe++; // used only by R_GetCurrentTexture
 
        R_UpdateFogColor();