#6077: OpenGL2: Add r_ignoreDstAlpha.

This commit is contained in:
SmileTheory 2013-12-17 04:08:25 -08:00
parent 1a86229538
commit bc2efc4870
3 changed files with 15 additions and 0 deletions

View file

@ -203,10 +203,16 @@ static int NameToSrcBlendMode( const char *name )
}
else if ( !Q_stricmp( name, "GL_DST_ALPHA" ) )
{
if (r_ignoreDstAlpha->integer)
return GLS_SRCBLEND_ONE;
return GLS_SRCBLEND_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_ONE_MINUS_DST_ALPHA" ) )
{
if (r_ignoreDstAlpha->integer)
return GLS_SRCBLEND_ZERO;
return GLS_SRCBLEND_ONE_MINUS_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_SRC_ALPHA_SATURATE" ) )
@ -243,10 +249,16 @@ static int NameToDstBlendMode( const char *name )
}
else if ( !Q_stricmp( name, "GL_DST_ALPHA" ) )
{
if (r_ignoreDstAlpha->integer)
return GLS_DSTBLEND_ONE;
return GLS_DSTBLEND_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_ONE_MINUS_DST_ALPHA" ) )
{
if (r_ignoreDstAlpha->integer)
return GLS_DSTBLEND_ZERO;
return GLS_DSTBLEND_ONE_MINUS_DST_ALPHA;
}
else if ( !Q_stricmp( name, "GL_SRC_COLOR" ) )