From cdc335ca30055dcb1a869adf66d1f1e427cc3526 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 14 Oct 2019 07:30:32 +0200 Subject: [PATCH] gpu: remove deprecated glEnable(GL_TEXTURE_2D). --- src/gpu/shader.cpp | 1 - src/gpu/texture.cpp | 3 --- src/scene.cpp | 8 -------- 3 files changed, 12 deletions(-) diff --git a/src/gpu/shader.cpp b/src/gpu/shader.cpp index 745974e3..2589b690 100644 --- a/src/gpu/shader.cpp +++ b/src/gpu/shader.cpp @@ -457,7 +457,6 @@ void Shader::SetUniform(ShaderUniform const &uni, mat4 const &m) void Shader::SetUniform(ShaderUniform const &uni, TextureUniform tex, int index) { glActiveTexture(GL_TEXTURE0 + index); - //glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, (int)tex.m_flags); SetUniform(uni, index); } diff --git a/src/gpu/texture.cpp b/src/gpu/texture.cpp index 20ddeadb..09e285db 100644 --- a/src/gpu/texture.cpp +++ b/src/gpu/texture.cpp @@ -102,9 +102,6 @@ TextureUniform Texture::GetTextureUniform() const void Texture::Bind() { -#if !defined HAVE_GLES_2X - glEnable(GL_TEXTURE_2D); -#endif glBindTexture(GL_TEXTURE_2D, m_data->m_texture); } diff --git a/src/scene.cpp b/src/scene.cpp index 2869d930..22f6b637 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -596,10 +596,6 @@ void Scene::render_tiles() // XXX: rename to Blit() rc.blend_equation(BlendEquation::Add, BlendEquation::Max); rc.alpha_func(AlphaFunc::GreaterOrEqual, 0.01f); -#if (defined LOL_USE_GLEW || defined HAVE_GL_2X) && !defined HAVE_GLES_2X - glEnable(GL_TEXTURE_2D); -#endif - if (!m_tile_api.m_shader) m_tile_api.m_shader = Shader::Create(LOLFX_RESOURCE_NAME(gpu_tile)); if (!m_tile_api.m_palette_shader && m_tile_api.m_palettes.count()) @@ -692,10 +688,6 @@ void Scene::render_tiles() // XXX: rename to Blit() if (!m_tile_api.m_palette_shader) break; } - -#if (defined LOL_USE_GLEW || defined HAVE_GL_2X) && !defined HAVE_GLES_2X - glDisable(GL_TEXTURE_2D); -#endif } // FIXME: get rid of the delta time argument