Skip to content

Commit e847a08

Browse files
committed
remove texture compression
1 parent 3bdc6d0 commit e847a08

6 files changed

Lines changed: 4 additions & 43 deletions

File tree

src/engine/client/backend_sdl.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -606,30 +606,6 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
606606
//
607607
int Oglformat = TexFormatToOpenGLFormat(pCommand->m_Format);
608608
int StoreOglformat = TexFormatToOpenGLFormat(pCommand->m_StoreFormat);
609-
610-
if(pCommand->m_Flags & CCommandBuffer::TEXFLAG_COMPRESSED)
611-
{
612-
if(m_IsOpenGLES)
613-
{
614-
switch(StoreOglformat)
615-
{
616-
case GL_RGB: StoreOglformat = GL_COMPRESSED_RGB8_ETC2; break;
617-
case GL_RED: StoreOglformat = GL_COMPRESSED_R11_EAC; break;
618-
case GL_RGBA: StoreOglformat = GL_COMPRESSED_RGBA8_ETC2_EAC; break;
619-
default: StoreOglformat = GL_COMPRESSED_RGBA8_ETC2_EAC;
620-
}
621-
}
622-
else
623-
{
624-
switch(StoreOglformat)
625-
{
626-
case GL_RGB: StoreOglformat = GL_COMPRESSED_RGB; break;
627-
case GL_RED: StoreOglformat = GL_COMPRESSED_RED; break;
628-
case GL_RGBA: StoreOglformat = GL_COMPRESSED_RGBA; break;
629-
default: StoreOglformat = GL_COMPRESSED_RGBA;
630-
}
631-
}
632-
}
633609
m_aTextures[pCommand->m_Slot].m_BasicSamplerType = SAMPLER2D_NOMIPMAPS;
634610
// 2D texture
635611
bool Mipmaps = !(pCommand->m_Flags & CCommandBuffer::TEXFLAG_NOMIPMAPS);

src/engine/client/graphics_threaded.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,6 @@ IGraphics::CTextureHandle CGraphics_Threaded::LoadTextureRaw(int Width, int Heig
354354
Cmd.m_Flags = 0;
355355
if(Flags & IGraphics::TEXLOAD_NOMIPMAPS)
356356
Cmd.m_Flags |= CCommandBuffer::TEXFLAG_NOMIPMAPS;
357-
if(m_pConfig->m_GfxTextureCompression)
358-
Cmd.m_Flags |= CCommandBuffer::TEXFLAG_COMPRESSED;
359357
if(m_pConfig->m_GfxTextureQuality || Flags & TEXLOAD_NORESAMPLE)
360358
Cmd.m_Flags |= CCommandBuffer::TEXFLAG_QUALITY;
361359
if(Flags & IGraphics::TEXLOAD_LINEARMIPMAPS)

src/engine/client/graphics_threaded.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,8 @@ class CCommandBuffer
104104
TEXFORMAT_ALPHA,
105105

106106
TEXFLAG_NOMIPMAPS = 1,
107-
TEXFLAG_COMPRESSED = 2,
108-
TEXFLAG_QUALITY = 4,
109-
TEXFLAG_LINEARMIPMAPS = 8,
107+
TEXFLAG_QUALITY = 2,
108+
TEXFLAG_LINEARMIPMAPS = 4,
110109
};
111110

112111
enum

src/engine/shared/config_variables.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ MACRO_CONFIG_INT(GfxClear, gfx_clear, 0, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "C
5858
MACRO_CONFIG_INT(GfxVsync, gfx_vsync, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Vertical sync")
5959
MACRO_CONFIG_INT(GfxDisplayAllModes, gfx_display_all_modes, 0, 0, 0, CFGFLAG_SAVE | CFGFLAG_CLIENT, "List non-supported display modes")
6060
MACRO_CONFIG_INT(GfxHighdpi, gfx_highdpi, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Use high dpi mode if available")
61-
MACRO_CONFIG_INT(GfxTextureCompression, gfx_texture_compression, 0, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Use texture compression")
6261
MACRO_CONFIG_INT(GfxHighDetail, gfx_high_detail, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "High detail")
6362
MACRO_CONFIG_INT(GfxTextureQuality, gfx_texture_quality, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Don't scale textures down")
6463
MACRO_CONFIG_INT(GfxFsaaSamples, gfx_fsaa_samples, 0, 0, 16, CFGFLAG_SAVE | CFGFLAG_CLIENT, "FSAA Samples")

src/game/client/components/menus_settings.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,6 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
16021602
static const int s_GfxFsaaSamples = Config()->m_GfxFsaaSamples;
16031603
static const int s_GfxOpenGLES = Config()->m_GfxOpenGLES;
16041604
static const int s_GfxTextureQuality = Config()->m_GfxTextureQuality;
1605-
static const int s_GfxTextureCompression = Config()->m_GfxTextureCompression;
16061605

16071606
CUIRect Label, Button, ScreenLeft, ScreenRight, Texture, BottomView, Background;
16081607

@@ -1628,7 +1627,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
16281627
ScreenLeft.Draw(vec4(0.0f, 0.0f, 0.0f, 0.25f));
16291628

16301629
// render textures menu background
1631-
NumOptions = 4;
1630+
NumOptions = 2;
16321631
BackgroundHeight = (float) (NumOptions + 1) * ButtonHeight + (float) NumOptions * Spacing;
16331632

16341633
MainView.HSplitTop(10.0f, 0, &MainView);
@@ -1776,14 +1775,6 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
17761775
m_CheckVideoSettings = true;
17771776
}
17781777

1779-
Texture.HSplitTop(Spacing, 0, &Texture);
1780-
Texture.HSplitTop(ButtonHeight, &Button, &Texture);
1781-
if(DoButton_CheckBox(&Config()->m_GfxTextureCompression, Localize("Texture Compression"), Config()->m_GfxTextureCompression, &Button))
1782-
{
1783-
Config()->m_GfxTextureCompression ^= 1;
1784-
m_CheckVideoSettings = true;
1785-
}
1786-
17871778
Texture.HSplitTop(Spacing, 0, &Texture);
17881779
Texture.HSplitTop(ButtonHeight, &Button, &Texture);
17891780
if(DoButton_CheckBox(&Config()->m_GfxHighDetail, Localize("High Detail"), Config()->m_GfxHighDetail, &Button))
@@ -1866,7 +1857,6 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
18661857
s_GfxFsaaSamples != Config()->m_GfxFsaaSamples ||
18671858
s_GfxOpenGLES != Config()->m_GfxOpenGLES ||
18681859
s_GfxTextureQuality != Config()->m_GfxTextureQuality ||
1869-
s_GfxTextureCompression != Config()->m_GfxTextureCompression ||
18701860
(CheckFullscreen && s_GfxFullscreen != Config()->m_GfxFullscreen);
18711861
m_CheckVideoSettings = false;
18721862
}
@@ -2064,7 +2054,6 @@ void CMenus::ResetSettingsGraphics()
20642054
Config()->m_GfxVsync = 1;
20652055
Config()->m_GfxFsaaSamples = 0;
20662056
Config()->m_GfxTextureQuality = 1;
2067-
Config()->m_GfxTextureCompression = 0;
20682057
Config()->m_GfxHighDetail = 1;
20692058
Config()->m_GfxOpenGLES = 0;
20702059

0 commit comments

Comments
 (0)