Przeglądaj źródła

gpu: remove deprecated glEnable(GL_TEXTURE_2D).

legacy
Sam Hocevar 5 lat temu
rodzic
commit
cdc335ca30
3 zmienionych plików z 0 dodań i 12 usunięć
  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 Wyświetl plik

@@ -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);
}


+ 0
- 3
src/gpu/texture.cpp Wyświetl plik

@@ -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);
}



+ 0
- 8
src/scene.cpp Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz