Browse Source

gpu: remove deprecated glEnable(GL_TEXTURE_2D).

legacy
Sam Hocevar 6 years ago
parent
commit
cdc335ca30
3 changed files with 0 additions and 12 deletions
  1. +0
    -1
      src/gpu/shader.cpp
  2. +0
    -3
      src/gpu/texture.cpp
  3. +0
    -8
      src/scene.cpp

+ 0
- 1
src/gpu/shader.cpp View File

@@ -457,7 +457,6 @@ void Shader::SetUniform(ShaderUniform const &uni, mat4 const &m)
void Shader::SetUniform(ShaderUniform const &uni, TextureUniform tex, int index) void Shader::SetUniform(ShaderUniform const &uni, TextureUniform tex, int index)
{ {
glActiveTexture(GL_TEXTURE0 + index); glActiveTexture(GL_TEXTURE0 + index);
//glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, (int)tex.m_flags); glBindTexture(GL_TEXTURE_2D, (int)tex.m_flags);
SetUniform(uni, index); SetUniform(uni, index);
} }


+ 0
- 3
src/gpu/texture.cpp View File

@@ -102,9 +102,6 @@ TextureUniform Texture::GetTextureUniform() const


void Texture::Bind() void Texture::Bind()
{ {
#if !defined HAVE_GLES_2X
glEnable(GL_TEXTURE_2D);
#endif
glBindTexture(GL_TEXTURE_2D, m_data->m_texture); glBindTexture(GL_TEXTURE_2D, m_data->m_texture);
} }




+ 0
- 8
src/scene.cpp View File

@@ -596,10 +596,6 @@ void Scene::render_tiles() // XXX: rename to Blit()
rc.blend_equation(BlendEquation::Add, BlendEquation::Max); rc.blend_equation(BlendEquation::Add, BlendEquation::Max);
rc.alpha_func(AlphaFunc::GreaterOrEqual, 0.01f); 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) if (!m_tile_api.m_shader)
m_tile_api.m_shader = Shader::Create(LOLFX_RESOURCE_NAME(gpu_tile)); 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()) 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) if (!m_tile_api.m_palette_shader)
break; 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 // FIXME: get rid of the delta time argument


Loading…
Cancel
Save