mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
Fix r_scale with csqc active.
This commit is contained in:
parent
c59f3e56f6
commit
bfb0f04708
2 changed files with 7 additions and 2 deletions
|
@ -484,7 +484,10 @@ void R_SetupGL (void)
|
||||||
int scale;
|
int scale;
|
||||||
|
|
||||||
//johnfitz -- rewrote this section
|
//johnfitz -- rewrote this section
|
||||||
scale = CLAMP(1, (int)r_scale.value, 4); // ericw -- see R_ScaleView
|
if (!r_refdef.drawworld)
|
||||||
|
scale = 1; //don't rescale. we can't handle rescaling transparent parts.
|
||||||
|
else
|
||||||
|
scale = CLAMP(1, (int)r_scale.value, 4); // ericw -- see R_ScaleView
|
||||||
glViewport (glx + r_refdef.vrect.x,
|
glViewport (glx + r_refdef.vrect.x,
|
||||||
gly + glheight - r_refdef.vrect.y - r_refdef.vrect.height,
|
gly + glheight - r_refdef.vrect.y - r_refdef.vrect.height,
|
||||||
r_refdef.vrect.width / scale,
|
r_refdef.vrect.width / scale,
|
||||||
|
@ -1062,7 +1065,7 @@ void R_ScaleView (void)
|
||||||
srcw = r_refdef.vrect.width / scale;
|
srcw = r_refdef.vrect.width / scale;
|
||||||
srch = r_refdef.vrect.height / scale;
|
srch = r_refdef.vrect.height / scale;
|
||||||
|
|
||||||
if (scale == 1)
|
if (scale == 1 || !r_refdef.drawworld)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// make sure texture unit 0 is selected
|
// make sure texture unit 0 is selected
|
||||||
|
|
|
@ -6587,6 +6587,7 @@ static void PF_cl_setproperty(void)
|
||||||
void R_SetupView (void);
|
void R_SetupView (void);
|
||||||
void V_PolyBlend (void);
|
void V_PolyBlend (void);
|
||||||
void R_RenderScene (void);
|
void R_RenderScene (void);
|
||||||
|
void R_ScaleView (void);
|
||||||
void SCR_DrawCrosshair (void);
|
void SCR_DrawCrosshair (void);
|
||||||
float CalcFovy (float fov_x, float width, float height);
|
float CalcFovy (float fov_x, float width, float height);
|
||||||
extern cvar_t scr_fov;
|
extern cvar_t scr_fov;
|
||||||
|
@ -6632,6 +6633,7 @@ static void PF_cl_renderscene(void)
|
||||||
|
|
||||||
R_SetupView ();
|
R_SetupView ();
|
||||||
R_RenderScene ();
|
R_RenderScene ();
|
||||||
|
R_ScaleView();
|
||||||
if (r_refdef.drawworld)
|
if (r_refdef.drawworld)
|
||||||
V_PolyBlend ();
|
V_PolyBlend ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue