Don't use compression for text rendering

This commit is contained in:
jupeyy 2019-01-20 14:28:59 +01:00
parent a5c78f85cf
commit 28ba295792
3 changed files with 5 additions and 4 deletions

View file

@ -430,7 +430,7 @@ int CGraphics_Threaded::LoadTextureRaw(int Width, int Height, int Format, const
Cmd.m_Flags = 0; Cmd.m_Flags = 0;
if(Flags&IGraphics::TEXLOAD_NOMIPMAPS) if(Flags&IGraphics::TEXLOAD_NOMIPMAPS)
Cmd.m_Flags |= CCommandBuffer::TEXFLAG_NOMIPMAPS; Cmd.m_Flags |= CCommandBuffer::TEXFLAG_NOMIPMAPS;
if(g_Config.m_GfxTextureCompression) if(g_Config.m_GfxTextureCompression && ((Flags&IGraphics::TEXLOAD_NO_COMPRESSION) == 0))
Cmd.m_Flags |= CCommandBuffer::TEXFLAG_COMPRESSED; Cmd.m_Flags |= CCommandBuffer::TEXFLAG_COMPRESSED;
if(g_Config.m_GfxTextureQuality || Flags&TEXLOAD_NORESAMPLE) if(g_Config.m_GfxTextureQuality || Flags&TEXLOAD_NORESAMPLE)
Cmd.m_Flags |= CCommandBuffer::TEXFLAG_QUALITY; Cmd.m_Flags |= CCommandBuffer::TEXFLAG_QUALITY;

View file

@ -295,7 +295,7 @@ class CTextRender : public IEngineTextRender
pMem = calloc(Width * Height, 1); pMem = calloc(Width * Height, 1);
} }
int TextureID = Graphics()->LoadTextureRaw(Width, Height, CImageInfo::FORMAT_ALPHA, pMem, CImageInfo::FORMAT_ALPHA, IGraphics::TEXLOAD_NOMIPMAPS); int TextureID = Graphics()->LoadTextureRaw(Width, Height, CImageInfo::FORMAT_ALPHA, pMem, CImageInfo::FORMAT_ALPHA, IGraphics::TEXLOAD_NOMIPMAPS | IGraphics::TEXLOAD_NO_COMPRESSION);
if(!pUploadData) if(!pUploadData)
free(pMem); free(pMem);

View file

@ -106,8 +106,9 @@ public:
*/ */
enum enum
{ {
TEXLOAD_NORESAMPLE = 1, TEXLOAD_NORESAMPLE = 1<<0,
TEXLOAD_NOMIPMAPS = 2, TEXLOAD_NOMIPMAPS = 1<<1,
TEXLOAD_NO_COMPRESSION = 1<<2,
}; };
int ScreenWidth() const { return m_ScreenWidth; } int ScreenWidth() const { return m_ScreenWidth; }