diff options
author | bunnei <bunneidev@gmail.com> | 2015-07-23 16:07:35 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-07-23 16:07:35 +0200 |
commit | cea45af64d30e144f71dc98125755758fa7302a0 (patch) | |
tree | 4617bce97b106fdd26b5278483e24385109026c9 | |
parent | Merge pull request #979 from Subv/border_color (diff) | |
parent | GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls (diff) | |
download | yuzu-cea45af64d30e144f71dc98125755758fa7302a0.tar yuzu-cea45af64d30e144f71dc98125755758fa7302a0.tar.gz yuzu-cea45af64d30e144f71dc98125755758fa7302a0.tar.bz2 yuzu-cea45af64d30e144f71dc98125755758fa7302a0.tar.lz yuzu-cea45af64d30e144f71dc98125755758fa7302a0.tar.xz yuzu-cea45af64d30e144f71dc98125755758fa7302a0.tar.zst yuzu-cea45af64d30e144f71dc98125755758fa7302a0.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 3526e16d5..9efc15337 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -147,20 +147,17 @@ void OpenGLState::Apply() { // Textures for (unsigned texture_index = 0; texture_index < ARRAY_SIZE(texture_units); ++texture_index) { - if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d) { + if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d || + texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) { + glActiveTexture(GL_TEXTURE0 + texture_index); if (texture_units[texture_index].enabled_2d) { - glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d); } else { - glDisable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, 0); } } - - if (texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) { - glActiveTexture(GL_TEXTURE0 + texture_index); - glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d); - } } // Framebuffer |