3126: Revert "Make GL 1.5 default" r=Learath2 a=def-

As discussed with Lerath2, we should try to debug

This reverts commit 537f47d11d.

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-10-17 21:54:40 +00:00 committed by GitHub
commit 2edec49c2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 116 additions and 121 deletions

View file

@ -621,8 +621,6 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
m_aTextures[pCommand->m_Slot].m_Height = Height; m_aTextures[pCommand->m_Slot].m_Height = Height;
m_aTextures[pCommand->m_Slot].m_RescaleCount = RescaleCount; m_aTextures[pCommand->m_Slot].m_RescaleCount = RescaleCount;
bool Supports2DTextureArrays = m_Has3DTextures || m_Has2DArrayTextures;
int Oglformat = TexFormatToOpenGLFormat(pCommand->m_Format); int Oglformat = TexFormatToOpenGLFormat(pCommand->m_Format);
int StoreOglformat = TexFormatToOpenGLFormat(pCommand->m_StoreFormat); int StoreOglformat = TexFormatToOpenGLFormat(pCommand->m_StoreFormat);
@ -637,7 +635,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
} }
} }
if((pCommand->m_Flags & CCommandBuffer::TEXFLAG_NO_2D_TEXTURE) == 0 || !Supports2DTextureArrays) if((pCommand->m_Flags & CCommandBuffer::TEXFLAG_NO_2D_TEXTURE) == 0)
{ {
glGenTextures(1, &m_aTextures[pCommand->m_Slot].m_Tex); glGenTextures(1, &m_aTextures[pCommand->m_Slot].m_Tex);
glBindTexture(GL_TEXTURE_2D, m_aTextures[pCommand->m_Slot].m_Tex); glBindTexture(GL_TEXTURE_2D, m_aTextures[pCommand->m_Slot].m_Tex);
@ -645,7 +643,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
if(pCommand->m_Flags & CCommandBuffer::TEXFLAG_NOMIPMAPS || !m_HasMipMaps) if(pCommand->m_Flags & CCommandBuffer::TEXFLAG_NOMIPMAPS || !m_HasMipMaps)
{ {
if((pCommand->m_Flags & CCommandBuffer::TEXFLAG_NO_2D_TEXTURE) == 0 || !Supports2DTextureArrays) if((pCommand->m_Flags & CCommandBuffer::TEXFLAG_NO_2D_TEXTURE) == 0)
{ {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@ -654,7 +652,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
} }
else else
{ {
if((pCommand->m_Flags & CCommandBuffer::TEXFLAG_NO_2D_TEXTURE) == 0 || !Supports2DTextureArrays) if((pCommand->m_Flags & CCommandBuffer::TEXFLAG_NO_2D_TEXTURE) == 0)
{ {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
@ -664,8 +662,6 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
glTexImage2D(GL_TEXTURE_2D, 0, StoreOglformat, Width, Height, 0, Oglformat, GL_UNSIGNED_BYTE, pTexData); glTexImage2D(GL_TEXTURE_2D, 0, StoreOglformat, Width, Height, 0, Oglformat, GL_UNSIGNED_BYTE, pTexData);
} }
if(Supports2DTextureArrays)
{
int Flag2DArrayTexture = (CCommandBuffer::TEXFLAG_TO_2D_ARRAY_TEXTURE | CCommandBuffer::TEXFLAG_TO_2D_ARRAY_TEXTURE_SINGLE_LAYER); int Flag2DArrayTexture = (CCommandBuffer::TEXFLAG_TO_2D_ARRAY_TEXTURE | CCommandBuffer::TEXFLAG_TO_2D_ARRAY_TEXTURE_SINGLE_LAYER);
int Flag3DTexture = (CCommandBuffer::TEXFLAG_TO_3D_TEXTURE | CCommandBuffer::TEXFLAG_TO_3D_TEXTURE_SINGLE_LAYER); int Flag3DTexture = (CCommandBuffer::TEXFLAG_TO_3D_TEXTURE | CCommandBuffer::TEXFLAG_TO_3D_TEXTURE_SINGLE_LAYER);
if((pCommand->m_Flags & (Flag2DArrayTexture | Flag3DTexture)) != 0) if((pCommand->m_Flags & (Flag2DArrayTexture | Flag3DTexture)) != 0)
@ -778,7 +774,6 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
free(p3DImageData); free(p3DImageData);
} }
} }
}
// This is the initial value for the wrap modes // This is the initial value for the wrap modes
m_aTextures[pCommand->m_Slot].m_LastWrapMode = CCommandBuffer::WRAP_REPEAT; m_aTextures[pCommand->m_Slot].m_LastWrapMode = CCommandBuffer::WRAP_REPEAT;
@ -3911,10 +3906,10 @@ void CCommandProcessorFragment_SDL::Cmd_Init(const SCommand_Init *pCommand)
pCommand->m_pCapabilities->m_QuadContainerBuffering = false; pCommand->m_pCapabilities->m_QuadContainerBuffering = false;
pCommand->m_pCapabilities->m_ShaderSupport = false; pCommand->m_pCapabilities->m_ShaderSupport = false;
pCommand->m_pCapabilities->m_MipMapping = GLEW_ARB_texture_non_power_of_two; pCommand->m_pCapabilities->m_MipMapping = false;
pCommand->m_pCapabilities->m_3DTextures = false; pCommand->m_pCapabilities->m_3DTextures = false;
pCommand->m_pCapabilities->m_2DArrayTextures = false; pCommand->m_pCapabilities->m_2DArrayTextures = false;
pCommand->m_pCapabilities->m_NPOTTextures = GLEW_ARB_texture_non_power_of_two; pCommand->m_pCapabilities->m_NPOTTextures = false;
} }
} }
} }

View file

@ -382,8 +382,8 @@ MACRO_CONFIG_INT(ClDemoShowSpeed, cl_demo_show_speed, 0, 0, 1, CFGFLAG_SAVE | CF
MACRO_CONFIG_INT(ClDemoKeyboardShortcuts, cl_demo_keyboard_shortcuts, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Enable keyboard shortcuts in demo player") MACRO_CONFIG_INT(ClDemoKeyboardShortcuts, cl_demo_keyboard_shortcuts, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Enable keyboard shortcuts in demo player")
// opengl // opengl
MACRO_CONFIG_INT(GfxOpenGLMajor, gfx_opengl_major, 1, 1, 10, CFGFLAG_SAVE | CFGFLAG_CLIENT, "OpenGL major version") MACRO_CONFIG_INT(GfxOpenGLMajor, gfx_opengl_major, 3, 1, 10, CFGFLAG_SAVE | CFGFLAG_CLIENT, "OpenGL major version")
MACRO_CONFIG_INT(GfxOpenGLMinor, gfx_opengl_minor, 5, 0, 10, CFGFLAG_SAVE | CFGFLAG_CLIENT, "OpenGL minor version") MACRO_CONFIG_INT(GfxOpenGLMinor, gfx_opengl_minor, 0, 0, 10, CFGFLAG_SAVE | CFGFLAG_CLIENT, "OpenGL minor version")
MACRO_CONFIG_INT(GfxOpenGLPatch, gfx_opengl_patch, 0, 0, 10, CFGFLAG_SAVE | CFGFLAG_CLIENT, "OpenGL patch version") MACRO_CONFIG_INT(GfxOpenGLPatch, gfx_opengl_patch, 0, 0, 10, CFGFLAG_SAVE | CFGFLAG_CLIENT, "OpenGL patch version")
// float multiplied with 1000 // float multiplied with 1000

View file

@ -1106,8 +1106,8 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
CheckSettings = true; CheckSettings = true;
if(IsNewOpenGL) if(IsNewOpenGL)
{ {
g_Config.m_GfxOpenGLMajor = 1; g_Config.m_GfxOpenGLMajor = 3;
g_Config.m_GfxOpenGLMinor = 5; g_Config.m_GfxOpenGLMinor = 0;
g_Config.m_GfxOpenGLPatch = 0; g_Config.m_GfxOpenGLPatch = 0;
IsNewOpenGL = false; IsNewOpenGL = false;
} }