mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 05:29:51 +01:00
engine: client: force nearest filter for HUD textures and sprites to avoid artifacts with hud_scale
This commit is contained in:
parent
52061621ac
commit
e5b32fe8ac
@ -1162,6 +1162,11 @@ static qboolean CL_LoadHudSprite( const char *szSpriteName, model_t *m_pSprite,
|
||||
// it's hud sprite, make difference names to prevent free shared textures
|
||||
if( type == SPR_CLIENT || type == SPR_HUDSPRITE )
|
||||
SetBits( m_pSprite->flags, MODEL_CLIENT );
|
||||
|
||||
// force nearest filter for hud sprites to have less artifacts with hud_scale
|
||||
if( type == SPR_HUDSPRITE )
|
||||
SetBits( texFlags, TF_NEAREST );
|
||||
|
||||
m_pSprite->numtexinfo = texFlags; // store texFlags into numtexinfo
|
||||
|
||||
if( !FS_FileExists( szSpriteName, false ) )
|
||||
|
@ -587,7 +587,7 @@ qboolean SCR_LoadFixedWidthFont( const char *fontname )
|
||||
if( !FS_FileExists( fontname, false ))
|
||||
return false;
|
||||
|
||||
cls.creditsFont.hFontTexture = ref.dllFuncs.GL_LoadTexture( fontname, NULL, 0, TF_IMAGE|TF_KEEP_SOURCE );
|
||||
cls.creditsFont.hFontTexture = ref.dllFuncs.GL_LoadTexture( fontname, NULL, 0, TF_IMAGE|TF_KEEP_SOURCE|TF_NEAREST );
|
||||
R_GetTextureParms( &fontWidth, NULL, cls.creditsFont.hFontTexture );
|
||||
cls.creditsFont.charHeight = clgame.scrInfo.iCharHeight = fontWidth / 16;
|
||||
cls.creditsFont.type = FONT_FIXED;
|
||||
@ -619,7 +619,7 @@ qboolean SCR_LoadVariableWidthFont( const char *fontname )
|
||||
if( !FS_FileExists( fontname, false ))
|
||||
return false;
|
||||
|
||||
cls.creditsFont.hFontTexture = ref.dllFuncs.GL_LoadTexture( fontname, NULL, 0, TF_IMAGE );
|
||||
cls.creditsFont.hFontTexture = ref.dllFuncs.GL_LoadTexture( fontname, NULL, 0, TF_IMAGE|TF_NEAREST );
|
||||
R_GetTextureParms( &fontWidth, NULL, cls.creditsFont.hFontTexture );
|
||||
|
||||
// half-life font with variable chars witdh
|
||||
|
Loading…
Reference in New Issue
Block a user