mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 05:41:46 +08:00
ref: gl: do not apply multisampling when drawing 2D
This commit is contained in:
@@ -227,6 +227,9 @@ void R_Set2DMode( qboolean enable )
|
||||
pglEnable( GL_ALPHA_TEST );
|
||||
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
if( glConfig.max_multisamples > 1 && gl_msaa.value )
|
||||
pglDisable( GL_MULTISAMPLE_ARB );
|
||||
|
||||
glState.in2DMode = true;
|
||||
RI.currententity = NULL;
|
||||
RI.currentmodel = NULL;
|
||||
@@ -243,6 +246,13 @@ void R_Set2DMode( qboolean enable )
|
||||
pglMatrixMode( GL_MODELVIEW );
|
||||
GL_LoadMatrix( RI.worldviewMatrix );
|
||||
|
||||
if( glConfig.max_multisamples > 1 )
|
||||
{
|
||||
if( gl_msaa.value )
|
||||
pglEnable( GL_MULTISAMPLE_ARB );
|
||||
else pglDisable( GL_MULTISAMPLE_ARB );
|
||||
}
|
||||
|
||||
GL_Cull( GL_FRONT );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1124,14 +1124,6 @@ void R_RenderFrame( const ref_viewpass_t *rvp )
|
||||
if( gl_finish.value && RI.drawWorld )
|
||||
pglFinish();
|
||||
|
||||
if( glConfig.max_multisamples > 1 && FBitSet( gl_msaa.flags, FCVAR_CHANGED ))
|
||||
{
|
||||
if( gl_msaa.value )
|
||||
pglEnable( GL_MULTISAMPLE_ARB );
|
||||
else pglDisable( GL_MULTISAMPLE_ARB );
|
||||
ClearBits( gl_msaa.flags, FCVAR_CHANGED );
|
||||
}
|
||||
|
||||
// completely override rendering
|
||||
if( gEngfuncs.drawFuncs->GL_RenderFrame != NULL )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user