ref: gl: drop legacy mirror viewpass code

This commit is contained in:
Alibek Omarov
2026-04-13 13:15:04 +05:00
committed by a1batross
parent 271a6e2210
commit ff3a57ae8a
4 changed files with 12 additions and 36 deletions

View File

@@ -71,16 +71,13 @@ void VGL_ShimEndFrame( void );
#define DEFAULT_ALPHATEST 0.0f
// refparams
#define RP_NONE 0
#define RP_ENVVIEW BIT( 0 ) // used for cubemapshot
#define RP_OLDVIEWLEAF BIT( 1 )
#define RP_CLIPPLANE BIT( 2 )
#define RP_NONE 0
#define RP_ENVVIEW BIT( 0 ) // used for cubemapshot
#define RP_NONVIEWERREF (RP_ENVVIEW)
#define R_ModelOpaque( rm ) ( rm == kRenderNormal )
#define R_StaticEntity( ent ) ( VectorIsNull( ent->origin ) && VectorIsNull( ent->angles ))
#define RP_LOCALCLIENT( e ) ((e) != NULL && (e)->index == ( gp_cl->playernum + 1 ) && e->player )
#define RP_NORMALPASS() ( FBitSet( RI.params, RP_NONVIEWERREF ) == 0 )
#define RP_NORMALPASS() ( FBitSet( RI.params, RP_ENVVIEW ) == 0 )
#define CL_IsViewEntityLocalPlayer() ( gp_cl->viewentity == ( gp_cl->playernum + 1 ))

View File

@@ -583,20 +583,6 @@ void R_SetupGL( qboolean set_gl_state )
pglMatrixMode( GL_MODELVIEW );
GL_LoadMatrix( RI.worldviewMatrix );
if( FBitSet( RI.params, RP_CLIPPLANE ))
{
GLdouble clip[4];
mplane_t *p = &RI.clipPlane;
clip[0] = p->normal[0];
clip[1] = p->normal[1];
clip[2] = p->normal[2];
clip[3] = -p->dist;
pglClipPlane( GL_CLIP_PLANE0, clip );
pglEnable( GL_CLIP_PLANE0 );
}
GL_Cull( GL_FRONT );
pglDisable( GL_BLEND );
@@ -604,17 +590,6 @@ void R_SetupGL( qboolean set_gl_state )
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
}
/*
=============
R_EndGL
=============
*/
static void R_EndGL( void )
{
if( RI.params & RP_CLIPPLANE )
pglDisable( GL_CLIP_PLANE0 );
}
/*
=============
R_RecursiveFindWaterTexture
@@ -1019,8 +994,6 @@ void R_RenderScene( void )
R_DrawEntitiesOnList();
R_DrawWaterSurfaces();
R_EndGL();
}
void R_GammaChanged( qboolean do_reset_gamma )
@@ -1115,8 +1088,14 @@ void R_SetupRefParams( const ref_viewpass_t *rvp )
RI.farClip = 0;
if( !FBitSet( rvp->flags, RF_DRAW_CUBEMAP ))
{
RI.drawOrtho = FBitSet( rvp->flags, RF_DRAW_OVERVIEW );
else RI.drawOrtho = false;
}
else
{
SetBits( RI.params, RP_ENVVIEW );
RI.drawOrtho = false;
}
// setup viewport
RI.viewport[0] = rvp->viewport[0];

View File

@@ -3787,7 +3787,7 @@ void R_MarkLeaves( void )
if( r_novis.value || RI.drawOrtho || !RI.viewleaf || !WORLDMODEL->visdata )
novis = true;
gEngfuncs.R_FatPVS( RI.pvsorigin, r_pvs_radius->value, RI.visbytes, FBitSet( RI.params, RP_OLDVIEWLEAF ), novis );
gEngfuncs.R_FatPVS( RI.pvsorigin, r_pvs_radius->value, RI.visbytes, false, novis );
if( force && !novis )
gEngfuncs.R_FatPVS( test, r_pvs_radius->value, RI.visbytes, true, novis );

View File

@@ -386,7 +386,7 @@ void R_DrawSpriteModel( cl_entity_t *e )
vec3_t v_forward, v_right, v_up;
vec3_t origin, color, color2 = { 0.0f };
if( RI.params & RP_ENVVIEW )
if( FBitSet( RI.params, RP_ENVVIEW ))
return;
model = e->model;