r_refdef.view.height = size;
r_refdef.view.depth = 1;
r_refdef.view.useperspective = true;
+ r_refdef.view.isoverlay = false;
r_refdef.view.frustum_x = tan(90 * M_PI / 360.0);
r_refdef.view.frustum_y = tan(90 * M_PI / 360.0);
qglClearColor(0,0,0,0);CHECKGLERROR
R_ClearScreen(false);
r_refdef.view.clear = false;
+ r_refdef.view.isoverlay = false;
r_refdef.view.quality = bound(cl_minfps_qualitymin.value, pow(cl_updatescreen_quality, cl_minfps_qualitypower.value) * cl_minfps_qualityscale.value, cl_minfps_qualitymax.value);
if(scr_stipple.integer)
// whether to call R_ClearScreen before rendering stuff
qboolean clear;
+ // if true, don't clear or do any post process effects (bloom, etc)
+ qboolean isoverlay;
// whether to draw r_showtris and such, this is only true for the main
// view render, all secondary renders (HDR, mirrors, portals, cameras,
r_refdef.view.ortho_x = scr_fov.value * (3.0 / 4.0) * (float)r_refdef.view.width / (float)r_refdef.view.height / vid_pixelheight.value;
r_refdef.view.ortho_y = scr_fov.value * (3.0 / 4.0);
r_refdef.view.clear = true;
+ r_refdef.view.isoverlay = false;
// FIXME: restore cl.csqc_origin
// FIXME: restore cl.csqc_angles
cl.csqc_vidvars.drawworld = true;
r_refdef.view.useperspective = k != 0;
break;
case VF_CLEARSCREEN:
- r_refdef.view.clear = k ? true : false;
+ r_refdef.view.isoverlay = !k;
break;
default:
PRVM_G_FLOAT(OFS_RETURN) = 0;
*/
void R_RenderView(void)
{
+ if (r_refdef.view.isoverlay)
+ {
+ // TODO: FIXME: move this into its own backend function maybe? [2/5/2008 Andreas]
+ GL_Clear( GL_DEPTH_BUFFER_BIT );
+ R_TimeReport("depthclear");
+
+ r_refdef.view.showdebug = false;
+
+ r_waterstate.enabled = false;
+ r_waterstate.numwaterplanes = 0;
+
+ R_RenderScene(false);
+
+ CHECKGLERROR
+ return;
+ }
+
if (!r_refdef.scene.entities || r_refdef.view.width * r_refdef.view.height == 0/* || !r_refdef.scene.worldmodel*/)
return; //Host_Error ("R_RenderView: NULL worldmodel");
R_ClearScreen(r_refdef.fogenabled);
if (r_timereport_active)
R_TimeReport("viewclear");
- } else {
- // TODO: FIXME: move this into its own backend function maybe? [2/5/2008 Andreas]
- GL_Clear( GL_DEPTH_BUFFER_BIT );
- R_TimeReport("depthclear");
}
r_refdef.view.clear = true;
t->currentmaterialflags = t->basematerialflags;
t->currentalpha = ent->alpha;
if (t->basematerialflags & MATERIALFLAG_WATERALPHA && (model->brush.supportwateralpha || r_novis.integer))
- {
t->currentalpha *= r_wateralpha.value;
- /*
- * FIXME what is this supposed to do?
- // if rendering refraction/reflection, disable transparency
- if (r_waterstate.enabled && (t->currentalpha < 1 || (t->currentmaterialflags & MATERIALFLAG_ALPHA)))
- t->currentmaterialflags |= MATERIALFLAG_WATERSHADER;
- */
- }
- if(t->basematerialflags & MATERIALFLAG_WATERSHADER && r_waterstate.enabled)
+ if(t->basematerialflags & MATERIALFLAG_WATERSHADER && r_waterstate.enabled && !r_refdef.view.isoverlay)
t->currentalpha *= t->r_water_wateralpha;
- if(!r_waterstate.enabled)
+ if(!r_waterstate.enabled || r_refdef.view.isoverlay)
t->currentmaterialflags &= ~(MATERIALFLAG_WATERSHADER | MATERIALFLAG_REFRACTION | MATERIALFLAG_REFLECTION);
if (!(ent->flags & RENDER_LIGHT))
t->currentmaterialflags |= MATERIALFLAG_FULLBRIGHT;